Lesson 8 of 13
Instructions: what the chip really understands
Explain that a processor knows only a small fixed set of dumb instructions — add, move, compare, jump — and that every program is a long list of them.
01 · Learn · the idea
Watch a video call and it feels like the machine just knows how to do it. Somewhere inside, surely, there’s a “make a video call” instruction — a big, smart command the chip understands. There isn’t. The processor you met last lesson, the one that fetches and runs instructions all day, understands a vocabulary so small and dumb you could write the whole list on a napkin. A few dozen things, each trivial. No “play video.” No “open the app.” Just move this number, add these two, is this bigger than that, go to a different line. Everything else — the call, the app, the whole running world of the machine — is built out of millions of those tiny dumb steps, arranged just so.
The whole vocabulary fits on a napkin
A processor’s complete set of things-it-can-do is called its instruction set. It is fixed in the silicon. The chip cannot learn a new instruction any more than a light switch can learn a third position. And the striking thing, the first time you see the real list, is how short and stupid each entry is.
They fall into a few families. A move shuffles a number from one place to another — pull a value out of memory into a register (the processor’s tiny on-chip scratchpad from last lesson), or write it back. Nothing is computed; a number is just relocated. Arithmetic instructions add or subtract two numbers — you already built the adder that does it, back in lesson 5. Compare instructions ask one yes-or-no question: is this number equal to that one? Bigger? Smaller? They don’t act on the answer; they just note it. And then the family that turns this dull list into a machine that can actually think: jump.
Each of these does one tiny thing. None is clever. The chip has no instruction meaning anything as grand as “decide” or “remember the user” — only these primitives, run a billion times a second.
Jump: how a dumb list learns to loop and decide
Normally the processor runs straight down its list of instructions — line 1, line 2, line 3 — its program counter (the line-tracker from last lesson) ticking up by one each time. A jump instruction breaks that march. It says: don’t go to the next line, set the program counter to line N instead. The processor obediently leaps there and carries on from the new spot.
On its own, a plain jump just moves around. The real power is the conditional jump: jump to line N, but only if the last comparison came out true. Now the two dumb families snap together. Compare two numbers, then jump-if-equal, and the machine has a fork in the road — take one path or the other depending on what it found. That is a decision, built from a compare and a jump, two trivial steps.
Jump backwards and you get a loop. Run some instructions, then jump up to an earlier line and run them again, with a conditional jump as the gate that repeats the block until some count runs out. Loops and decisions — the two things that make a program more than a fixed recipe — are nothing but jumps. There is no “loop” instruction. There’s a jump that happens to point backward.
Every instruction is just a number
Here is the part that closes the circle. An instruction isn’t a special kind of thing. It’s a number sitting in memory, exactly like the data — the same on/off bits, in the same latches from lesson 6. One number means “add”; another means “jump”; this is the opcode, the numeric code for an operation. The processor fetches that number (lesson 7), its bits flow through the gates, and the gates light up the right wires to carry it out. A program is just a long list of these numbers in memory. Code and data are the same stuff. The machine treats a number as an instruction only because the program counter happens to be pointing at it.
A worked example: counting to six
Let’s make a few dumb steps do real work. We want to add up 1, 2, and 3 — the answer is 6 — using only the primitives above. Here is a program. Total and n are two registers; the lines are numbered.
- SET total = 0
- SET n = 1
- ADD n into total
- ADD 1 into n
- COMPARE n with 4
- JUMP to line 3 if n is not equal to 4
- HALT
Walk it. Line 1 and 2 set up: total is 0, n is 1. Line 3 adds n (1) into total — total is now 1. Line 4 bumps n to 2. Line 5 compares n (2) with 4 — not equal. Line 6 sees “not equal,” so it jumps back to line 3. Round again: total becomes 1+2 = 3, n becomes 3, compare 3 with 4 — not equal, jump back. Round three: total becomes 3+3 = 6, n becomes 4, compare 4 with 4 — equal this time. Line 6’s condition fails, so it does not jump; the program counter ticks on to line 7, HALT. Total: 6.
Look at what just happened. Seven trivial lines — set, add, compare, jump — and a compare-and-jump pair quietly ran the block three times, stopping at the right moment. No line knew it was “adding up a list.” The repetition lived entirely in line 6 pointing backward.
The gap is arranged steps, not a smarter step
So when the machine makes a video call, it is not reaching for a bigger, wiser instruction. It is running millions of these same dumb steps — moves, adds, compares, jumps — laid out in an order that, taken whole, comes out as a call. The distance between “add 1 to a register” and “a face on a screen, live, across the planet” is not intelligence anywhere in the silicon. It is arrangement. The chip has no idea what it is doing; it holds no concept of a face, a call, a person. It only ever does the next tiny thing the ordering puts in front of it. All the meaning lives in how the dumb steps are stacked, not in any step.
Which raises the obvious problem: nobody sane writes a video call as millions of these by hand. They don’t. Next we climb the ladder that lets a person write one human line and have it turn, layer by layer, into this.
02 · Try · the lab
03 · Check · quick quiz
1. Your phone plays a video. Which best describes what the processor is actually doing?
- Running one 'play video' instruction built into the chip
- Running millions of tiny dumb instructions — moves, adds, compares, jumps — arranged to come out as video
- Looking up the video in a library of pre-made commands
- Using a special high-level instruction the chip learned from the app
Answer
Running millions of tiny dumb instructions — moves, adds, compares, jumps — arranged to come out as video — There is no 'play video' instruction. A processor's whole vocabulary is a few dozen trivial operations. Anything complex is built from millions of those dumb steps in the right order. The chip can't learn new instructions — the set is fixed in silicon.
2. A program runs straight down its list, line by line. What lets it instead repeat a block of lines (a loop) or take one path or another (a decision)?
- A dedicated LOOP instruction and a dedicated DECIDE instruction
- The jump instruction — especially a conditional jump that only jumps if the last compare was true
- Extra memory set aside for loops
- A faster clock speed that doubles lines back automatically
Answer
The jump instruction — especially a conditional jump that only jumps if the last compare was true — There is no LOOP or DECIDE instruction. Jump to an earlier line and you have a loop; compare-then-jump-if-true and you have a decision. Loops and decisions are nothing but jumps — that is how a dumb top-to-bottom list does real work.
3. In the lab's count-to-six program, the loop kept running until n reached 4, then stopped. What made it stop at exactly the right moment?
- The HALT line counted how many times the loop had run
- The COMPARE made the flag 'equal', so the conditional jump no longer jumped back
- The processor noticed total had reached 6 and ended itself
- The program ran out of memory after three loops
Answer
The COMPARE made the flag 'equal', so the conditional jump no longer jumped back — Each round COMPARE checked n against 4. While they differed, the conditional jump leapt back to repeat. When n finally equalled 4 the flag flipped to 'equal', the jump's condition failed, and the program counter ticked on to HALT. The machine had no idea it was 'adding a list' — the stopping lived entirely in that compare-and-jump.