LOGBOOK

HELP

Quiz Entry - updated: 2026.07.14

What are the AT&T size suffixes and when do you need them?

The suffix letters b, w, l, q set the operand size to 1, 2, 4, or 8 bytes; you need them only when the size can't be inferred from a register operand.

The four AT&T size suffixes b, w, l, q mapped to 1, 2, 4, and 8 byte operand sizes

* The suffix picks the operand width; you only need it when no register operand already fixes the size. *

Suffix Size Example Meaning
b 1 byte movb $0, %al Move byte
w 2 bytes movw $0, %ax Move word
l 4 bytes movl $0, %eax Move long (doubleword)
q 8 bytes movq $0, %rax Move quad

When required: When the operand size is ambiguous, e.g. movl $0, (%rax) — without l the assembler wouldn't know how many bytes to write.

When optional: When a register operand already implies the size, e.g. mov %eax, %ebxeax is always 4 bytes.

Go deeper:

From Quiz: REVE1 / Assembly Patterns & GDB | Updated: Jul 14, 2026