Data Representation and Types
Learn how integers, characters, and other data types are stored in memory and manipulated using assembly instructions.
What are Data Types?
In assembly language, we work directly with raw bits and bytes. But how do we know if a sequence of bytes represents a number, a character, or something else?
This is where data types come in! They give meaning to the raw data, helping both you and the CPU understand how to interpret and manipulate information.
Common Data Sizes
x86 assembly defines standard sizes for data. These directly correspond to how much memory space a piece of data occupies:
- BYTE: 8 bits
- WORD: 16 bits (2 bytes)
- DWORD: Double Word, 32 bits (4 bytes)
- QWORD: Quad Word, 64 bits (8 bytes)
These sizes are fundamental for declaring variables and working with registers.
All lessons in this course
- x86 Registers Demystified
- Memory Addressing Modes
- Data Representation and Types
- The FLAGS Register and Status Bits