5.1.5 · D1Instruction Set Architecture (ISA)

Foundations — x86 architecture overview

1,856 words8 min readBack to topic

This page assumes you know nothing except how to count. We build every symbol the parent x86 overview uses, one brick at a time.


1. The bit — the single switch

Picture a light switch on a wall. It has exactly two states. That's a bit. Everything else in this entire subject is just many of these switches lined up in a row.

Figure — x86 architecture overview

2. The byte and the "width" of things

Look at figure s01 again: 8 switches side by side make one byte. The parent's phrase "8086 was 16-bit" simply means its main storage rows were 16 switches long (2 bytes). "64-bit" means 64 switches long (8 bytes).

width patterns biggest value
8 (byte) 256 255
16 65 536 65 535
20 1 048 576 (1 MB) 1 048 575
32 ~4.3 billion ~4.3 billion − 1
64 ~ huge

3. Hexadecimal — a shorthand for switch-rows

Figure — x86 architecture overview

4. Shifting bits left — what "×16" really is

Figure — x86 architecture overview

5. Register — a named switch-row inside the CPU

Picture a labelled box holding 64 switches. The parent's whole table (RAX/EAX/AX/AL) is describing one such box that you're allowed to peek at using different window-sizes:

  • AL = the lowest 8 switches,
  • AX = the lowest 16,
  • EAX = the lowest 32,
  • RAX = all 64.
Figure — x86 architecture overview

6. Offset, Segment, Address — pointing at memory

Now every symbol in the parent's key formula is defined: Read it as: slide the segment-row 4 places left (×16), then add the offset-row. Both pieces are 16 switches; the shift lifts one to fill the top of a 20-switch address. Nothing here is mysterious anymore.


7. Opcode, prefix, instruction — commands made of bytes


Prerequisite map

Bit = one switch

Byte and bit-width

Patterns = 2 to the n

Hexadecimal shorthand

Left shift = times 2 to the k

Registers RAX EAX AX AL

Segment Offset Address

Instruction and Opcode bytes

x86 architecture overview

Each foundation flows into the parent x86 overview; nothing there uses a brick we haven't laid here. Contrast with ARM Architecture once you've mastered these.


Equipment checklist

Cover the right side and test yourself. If any line surprises you, reread its section.

What is a bit?
One switch that is either 0 (off) or 1 (on).
How many bits in a byte?
8 bits.
How many distinct patterns fit in bits?
.
Why does hardware want a 20-bit address for 1 MB?
Because , so 20 switches can name every byte.
How many bits does one hex digit stand for?
4 bits (one nibble), since .
Write as a decimal number.
.
What does do, and what does it equal?
Slides the switches 4 places left; equals .
Is "Segment × 16" a runtime multiply?
No — it is a left shift by 4 bits, done by wiring, essentially free.
What is a register?
A named switch-row inside the CPU, the fastest storage the maths unit can reach.
What is AL compared to RAX?
The lowest 8 bits (a small window) onto the same 64-bit register.
What is an opcode?
The byte(s) saying what an instruction does — its verb.
Why do x86 instructions vary from 1 to 15 bytes?
Because constants are stored inside the instruction, so bigger constants make it longer.