Inside the CPU: Fetch, Decode, Execute
The cycle a processor repeats: fetch the next instruction from memory, work out what it means, carry it out. Clock speed, cores and cache each change how fast that goes.
What a learner can do afterwards
- Put the three stages of the cycle in order and say what each does
- Explain what a higher clock speed buys, and what extra cores buy
- Explain why both instructions and data sit in memory while a program runs
1 · Read
Your processor repeats one cycle: fetch the next instruction from memory, decode what it means, then execute it. Fetch, decode, execute, and round again. That loop runs every app you open, billions of times a second.
The ALU does the maths and comparisons during execute, once decode has spoken, using chains of AND, OR and NOT gates. Clock speed counts cycles per second, so 3 GHz means about 3 billion rounds each second.
A faster clock squeezes more rounds into each second, while extra cores run whole cycles side by side. Two cores are not always twice as fast, since some work refuses to split. Cache helps too: it shelves recent instructions nearby, and programs reuse the same bits so often that fetching flies.
Both instructions and data wait in memory during a run, since each fetch grabs the next order from there. Pushing clocks past stock speeds cooks extra heat, so speed always trades against cooling.
Fetch from memory, decode the meaning, execute the deed, and speed that loop with clocks, cores and cache.
2 · Watch
Take it off screen
Where it sits
8 questions wait behind this lesson, each with its answer explained. Every answer feeds the sky: stars light as they are learned, and dim when it is time to come back.