Chapter 10 ended with a problem: rendering millions of pixels, 60 times a second, is a massive and repetitive job. Two different kinds of chips can do it — but only one of them is actually built for that scale.
A CPU (Central Processing Unit) typically has somewhere between 4 and 16 cores. Each one is fast, flexible, and great at handling one complex task at a time — or jumping between very different tasks in sequence, the way you'd work through a to-do list one item at a time.
Watch the cores take turns — one task at a time, handled quickly.
A GPU (Graphics Processing Unit) has thousands of much simpler cores. Individually, each one is weaker than a CPU core — but they can all run the same simple instruction on different pieces of data, all at once. "Set this pixel's color" is one instruction; a GPU can apply it to a million pixels simultaneously.
Every core lights up together — same instruction, applied everywhere at once.
Below is a 24×24 grid — 576 pixels, like a tiny corner of your screen from Chapter 10. Fill it in two different ways and compare.
| CPU | GPU |
|---|---|
| Running your operating system | Rendering 3D games and video |
| Loading a webpage, running app logic | Processing video effects and editing |
| Decision-heavy, branching tasks | The same simple math, repeated millions of times |
That last row is why GPUs turned out to be surprisingly good at AI. Training a neural network is, underneath it all, the same kind of pattern — a huge number of simple calculations, all independent, all able to run at once. The chip built for pixels turned out to be built for that too.