Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

variable-length encoding

An instruction set where instructions come in different sizes, so you only learn where the next one starts by reading the current one.

In a variable-length encoding each instruction's length depends on its contents; x86-64 instructions are 1 to 15 bytes, and the length is determined by decoding prefixes, opcode, ModRM, SIB, displacement and immediate in order.

Examples

  • x86-64 ret is 1 byte (c3), add rax, rcx is 3, and movabs rax, imm64 is 10.

Read the full section →