Inside the CPU
The processor in your phone only knows how to do very simple things. It just does them billions of times a second.
Swipe or tap Next for the next section
The Brain That Follows a List
The CPU (central processing unit) is the part of a computer that runs programs. It doesn't understand apps or games. It understands tiny instructions like "load this number", "add these two" and "save the result". A program is a long list of them, stored in memory.
The CPU works through the list with the same three steps, over and over:
- Fetch — get the next instruction from memory.
- Decode — work out what the instruction means.
- Execute — do it.
The fetch–decode–execute cycle: the loop every program runs on, billions of times a second.
The CPU's Notepad
Inside the CPU are a few very fast storage spots called registers. The demo uses three:
- Program counter — the address of the next instruction to fetch.
- Instruction register — the instruction being worked on right now.
- Accumulator — where the result of a calculation is kept.
Memory
Faster and Faster
A CPU's clock ticks billions of times a second — a 3 GHz processor ticks about three billion times. Each tick moves the work forward. Modern CPUs also have several cores, which are like several CPUs in one chip, each running its own fetch–decode–execute loop at the same time. That's the same idea as running tasks in parallel.
Memory vs Storage
RAM (memory)
Very fast. Holds the programs and data in use right now.
Forgets everything when the power goes off.
Storage (SSD or hard drive)
Slower, but much bigger and cheaper.
Keeps your files and apps when the power is off.
When you open an app, it's copied from storage into RAM so the CPU can fetch its instructions quickly.
5 quick questions. Pick one answer for each — you'll see why straight away.
What are the three steps the CPU repeats for every instruction?
It fetches the next instruction from memory, decodes what it means, and executes it — then starts again.
What does the program counter hold?
The program counter points at where the next instruction is. It moves on by one after each fetch.
A CPU is described as 3 GHz. Roughly what does that mean?
Giga means billion and hertz means "per second". Each tick lets the CPU move its work forward a step.
Why does a computer need RAM as well as storage like an SSD?
Programs and data are copied into fast RAM while in use. Storage is slower but keeps everything when the power is off.
In the demo, what does STORE 7 do?
STORE writes the result from the accumulator back into memory, so it isn't lost when the next calculation starts.