The Foundry · Level 2

How a CPU Thinks

A computer's brain does the same tiny loop, billions of times a second. Run one by hand and watch it think.

The loop behind everything

A CPU does not really "think" like you. It repeats three small jobs, over and over.

FetchGet the next instruction
DecodeWork out what it means
ExecuteDo it
A CPU repeats fetch, decode, execute billions of times every second. That loop is the whole show. Everything a computer does is this tiny cycle, run faster than you can blink.
Here is the secret: the instructions and the data are just numbers. A program is a list of numbers, and the answers are numbers too. The CPU only ever moves and adds numbers around.

← The Foundry · every fact here is real science, kept simple. Tap the underlined words to dig deeper.