Click a size to see which bytes it covers in RAX, how it lays out in memory (little-endian), and why DWORD writes are special.
RAX — value: 0xDEADBEEF12345678AL
BYTE — B0
Size Details
Memory at 0x7fff1000 (little-endian)
When mov eax, [rsp] executes, what happens to bits 32–63 of RAX?
In x86-64, writing to any 32-bit register (EAX, EBX, ECX…) always zeroes bits 32–63 of the full 64-bit register. Intel mandated this rule for 64-bit mode. Only 8-bit and 16-bit writes leave the upper bits unchanged — which can be a source of subtle bugs.
Value 0x1234 is stored at address 0x1000 as a WORD (little-endian). What byte is at address 0x1000?
x86 is little-endian: the least significant byte is stored at the lowest address. The low byte of 0x1234 is 0x34, so it lands at 0x1000. The high byte 0x12 goes to 0x1001. Memory layout always looks “backwards” compared to how we write numbers on paper.