Exercise 1: Which Bits of RAX Each Sub-Register Write Touches — Possible Solution ==================================================================== USING THE CHAPTER'S OWN BIT DIAGRAMS ------------------------------ RAX spans the full 64 bits: bits 63 down to 0. EAX spans the low 32 bits: bits 31 down to 0. AX spans the low 16 bits: bits 15 down to 0. AH spans bits 15 down to 8 (the upper half of AX). AL spans bits 7 down to 0 (the lower half of AX). WRITING TO AL ------------------------------ Only bits 7 through 0 of RAX are affected. Every other bit in RAX (bits 8 through 63, including AH's own bits 15-8) is left completely unchanged. WRITING TO AX ------------------------------ Bits 15 through 0 of RAX are affected — this covers both AH (bits 15-8) and AL (bits 7-0) at once, since AX is defined as those two bytes combined. Bits 16 through 63 of RAX are left completely unchanged. WRITING TO EAX ------------------------------ Bits 31 through 0 of RAX are affected directly by the value being written. But per this chapter's own warn-box, writing to a 32-bit sub-register ALSO zeroes out bits 63 through 32 — so a write to EAX affects bits 31-0 with the actual new value, AND forces bits 63-32 to all become 0, even though the instruction's own operand only supplied 32 bits of new data. WHY THIS WORKS AS AN ANSWER ------------------------------ It maps each sub-register name to its exact bit range using the chapter's own diagrams, and correctly distinguishes AL/AX (which only ever touch their own bit range, leaving everything above untouched) from EAX (which touches its own 32 bits AND additionally zeroes the 32 bits above it) — the precise asymmetry the chapter's warn-box describes.