Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 02 · How Computers Work · The machine runs a program · about 16 min to read

Play it as a journeyTutor comes with a plan

The CPU (fetch-decode-execute, the ISA, assembly)

The CPU
The CPU · Open board

The loop every chip runs, drawn as a circle: read the next instruction, work out what it wants, do it, then go back for the next one, with the one arrow that jumps out of the circle instead of moving to the next stop.

Before you start. Logic From Switches (transistors → gates → adder → memory) built an ALU, a circuit of gates that adds and compares numbers, and flip-flops, single bits of memory that hold a value until told to change. This lesson wires both into a chip that repeats one small loop forever, and by the end you can read the actual bytes that loop is running.

Lesson 5 of 41 in How Computers Work

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • 1969-71: one chip that could be told what to do
  • The one loop, run forever
  • One line, three bytes: the vocabulary a chip understands
  • The same three lines, in two accents
  • Doing more per tick
  • The guess that can be wrong
  • Down to the bytes

Terms it explains: instruction, registers, assembly, pipeline, instruction set architecture (ISA), CISC, RISC, opcode, ALU, branch prediction, CISC vs RISC, clock, core, fetch-decode-execute, flags, immediate, IPC, ISA, operand, out-of-order, PC (program counter), pipelining, register, superscalar.

Related paper

Review How Computers Work