Skip to main content
← CPUs Lesson 6 / 6

Code → Bits

A chip can't read 2 + 3 — it only obeys numbered commands. A compiler turns your line of code into a tiny list of those numbers, and each number is just a few bits.

1. Pick a line of code

  2 + 3
0 / 4 instructions

Each step lowers your code one rung: high-level → assembly → machine-code bits. That's compiling.

2. Run it on the CPU

Finish compiling all 4 instructions first, then run them.

Compile ladder

High-level
  1. 2 + 3
    — — —
    ········ ········
  2. — — —
    ········ ········
  3. — — —
    ········ ········
  4. — — —
    ········ ········

CPU registers

R0 0
R1 0

Output