Inside a Computer Processor
Billions of switches, a clock ticking billions of times a second, and the reason halving the voltage matters more than halving the speed.
A processor is a slab of silicon about the size of a fingernail. Each tick of its clock, it fetches an instruction, works out what it means and does it. Nearly every number it handles is stored in registers and moved through an arithmetic unit built from logic gates.
Conceptual only. Do not open real devices: they can hold mains voltage, charged capacitors, sharp edges or springs.
1Explode it
Pull the computer processor apart.
fig. 04 · computer processor, coming apart
Parts of the computer processor, as a list
- Heat spreader. A metal lid that protects the silicon and spreads its heat to the cooler. Engineering idea: All the electrical power a chip uses ends up as heat. Copper conducts heat well, so a wide lid lets a fan or heat sink carry away tens of watts from a tiny area.
- Control unit. Fetches each instruction from memory, decodes it, and tells the rest of the chip what to do. Engineering idea: The fetch–decode–execute cycle. The control unit is a large state machine: each instruction's bits choose which paths open and which operation runs.
- Arithmetic logic unit. Adds, subtracts, compares and does bitwise logic on binary numbers. Engineering idea: An adder is just logic gates: a half adder is an XOR for the sum and an AND for the carry. Chain enough of them and you can add 64-bit numbers in a single clock tick.
- Registers. A small set of very fast storage slots holding the numbers being worked on right now. Engineering idea: Registers are built from flip-flops, circuits that remember one bit until the clock tells them to change. Their fixed width (often 64 bits) is why integers in code have a maximum size.
- Cache memory. Keeps copies of recently used data close to the cores, because main memory is far slower. Engineering idea: Programs tend to reuse the same data and the data next to it. Keeping a small fast copy means most reads never wait for the slow trip to main memory.
- Clock generator. Produces the steady tick that keeps every part of the chip in step. Engineering idea: Each tick, every flip-flop updates at once, then the logic between them has until the next tick to settle. The time the slowest path takes to settle sets the maximum clock speed.
- Package substrate. A small circuit board that connects the tiny die to over a thousand contacts on the bottom. Engineering idea: The connections on silicon are far too fine to solder directly. The substrate fans them out to a spacing a motherboard socket can reach, carrying power, memory signals and data.
2Part by part
What every piece is for.
- 01
Heat spreader
A metal lid that protects the silicon and spreads its heat to the cooler.
the idea →All the electrical power a chip uses ends up as heat. Copper conducts heat well, so a wide lid lets a fan or heat sink carry away tens of watts from a tiny area.
- 02
Control unit
Fetches each instruction from memory, decodes it, and tells the rest of the chip what to do.
the idea →The fetch–decode–execute cycle. The control unit is a large state machine: each instruction's bits choose which paths open and which operation runs.
Inside a microcontrollerSuper-loops and finite state machines
- 03
Arithmetic logic unit
Adds, subtracts, compares and does bitwise logic on binary numbers.
the idea →An adder is just logic gates: a half adder is an XOR for the sum and an AND for the carry. Chain enough of them and you can add 64-bit numbers in a single clock tick.
Logic gates and Boolean algebraBinary, hexadecimal and digital signals
- 04
Registers
A small set of very fast storage slots holding the numbers being worked on right now.
the idea →Registers are built from flip-flops, circuits that remember one bit until the clock tells them to change. Their fixed width (often 64 bits) is why integers in code have a maximum size.
Sequential logic and memoryFixed-width integers, bits and registers
- 05
Cache memory
Keeps copies of recently used data close to the cores, because main memory is far slower.
the idea →Programs tend to reuse the same data and the data next to it. Keeping a small fast copy means most reads never wait for the slow trip to main memory.
Sequential logic and memoryAlgorithms, searching and complexity
- 06
Clock generator
Produces the steady tick that keeps every part of the chip in step.
the idea →Each tick, every flip-flop updates at once, then the logic between them has until the next tick to settle. The time the slowest path takes to settle sets the maximum clock speed.
- 07
Package substrate
A small circuit board that connects the tiny die to over a thousand contacts on the bottom.
the idea →The connections on silicon are far too fine to solder directly. The substrate fans them out to a spacing a motherboard socket can reach, carrying power, memory signals and data.
3The system
How the parts talk to each other.
Almost every machine has the same shape: something senses, something decides, something acts on the world, and a measurement feeds back so the decision can improve.
Inputs(sense)
- Main memoryinstructions and data
- Input deviceskeyboard, network…
Controller(think)
- Control unitfetch, decode, execute
Actuators(act)
- ALUdoes the operation
- Write backto registers or memory
The physical system(what changes)
- Registers and cachethe machine's state
Signals forward
- Main memory to Control unitnext instruction
- Input devices to Control unitinterrupts
- Control unit to ALUwhich operation
- Control unit to Write backwhere the result goes
- ALU to Registers and cacheresult
- Write back to Registers and cachestore
Feedback: the loop closes here
- Registers and cache feeds back to Control unitflags and operands
4The maths
Where does the power go?
Every time a transistor switches, it charges or empties a tiny capacitor. That costs energy proportional to C·V², and it happens f times a second. Because voltage is squared, lowering it saves far more than lowering the clock alone.
the model
P ≈ α·C·V²·f
- At 1.0 V and 3 GHz
- 30 W
- At 0.8 V and 2.4 GHz
- 15.36 W
Go deeper: the worked numbers
Symbols
- α·C
- capacitance actually switched each tick (F)
- V
- supply voltage (V)
- f
- clock frequency (Hz)
Worked example
- 1.P = 10 nF × (1.0 V)² × 3 GHz = 30 W
- 2.Drop both voltage and clock by 20%: P = 10 nF × (0.8 V)² × 2.4 GHz ≈ 15.4 W
- 3.20% slower, but about half the power
5 · Your turn · Logic gates lab
Build the adder
In the Logic lab, combine an XOR and an AND into a half adder and check its truth table against binary addition. That is the first brick of the ALU.
runs in your browser, nothing to unscrew
Keep going
Concepts in the Atlas
Builds
Videos (open on YouTube)
- The Central Processing Unit (CPU): Crash Course Computer Science #7 (opens in a new tab)CrashCourse · 11 min 37 s
- Learn how computers add numbers and build a 4 bit adder circuit (opens in a new tab)Ben Eater · 13 min 38 s
- Boolean Logic & Logic Gates: Crash Course Computer Science #3 (opens in a new tab)CrashCourse · 10 min 7 s
- Exploring How Computers Work (opens in a new tab)Sebastian Lague · 18 min 12 s