GCSE · Computer Science · AQA · Spec 8525

Cache memory

RAM is close to your CPU, but not inside it, so every trip there takes time. So what if the things the CPU uses most were kept right beside it?

Follow one request

Where will the CPU find it?

The CPU needs an instruction. Guess first: how far will it have to go? Then walk every route, choosing 'found' or 'not there' at each stop, and compare where each one ends.

Level 1 cache → Level 2 cache → Level 3 cache → RAM

  • First stop: level 1 cache, which is usually part of the CPU itself.

4 possible routes.

On The CPU needs an instruction or some data. 2 branches to choose from.

Watch out: Cache doesn't replace RAM. It keeps copies of frequently used instructions and data, so the CPU can skip the trip whenever what it needs is already there.

Commit, then check

Fastest first

How quickly the CPU can get an instruction or data from it

1 · Fastest4 · Slowest
  1. RAM

  2. Level 2 cache

  3. Level 1 cache

  4. Level 3 cache

Watch out: If you put level 3 first because it's the biggest, you've ranked by size, not speed. Here, bigger means slower.

How big is each level?

Tap each level. Dots show roughly where its typical sizes sit; real sizes vary from one processor to another.

10 KB100 KB1 MB10 MB100 MBTypical capacity (each tick is 10 times the one before)

Level 1

tens or hundreds of KB, e.g. 64 KB

The smallest level: measured in tens or hundreds of kilobytes, with 64 KB a typical example.

What do you really think?

What is cache, really?

Four friends are revising together. Each one sums up cache in a sentence.

Which one is closest to what you think right now?
How sure are you?

Your turn to write

Why does more cache help?

Explain how a larger cache can improve the performance of a computer. [4 marks]

0 words · your answer stays on this page and is not sent anywhere.

UK note

AQA GCSE Computer Science (8525), section 3.4.5: cache memory.

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

Every trip to RAM costs the CPU time. Find out how a tiny, very fast memory keeps the things it uses most within easy reach, and why there are three levels of it.

What you need to know

  • Cache is a small, very fast memory, built into the CPU or sitting very close to it.
  • It keeps copies of frequently used instructions and data, so they're quickly available for the CPU to fetch.
  • RAM is near the CPU but not inside it, so data and instructions spend time travelling along the buses.
  • Have a goMo is confident: 'RAM sits right next to the CPU, so getting things from RAM is basically instant.' What has Mo missed?

    RAM isn't inside the CPU, so everything has to travel along the buses first.

    Near isn't the same as inside. That travel time is real, and it's exactly the waiting that cache is there to cut.

  • Compared with RAM, cache is faster but smaller in capacity.
  • There are three levels. Level 1 is usually part of the CPU, with the smallest capacity and the fastest speed.
  • Level 2 is usually in the CPU too, but further away: bigger and slower than level 1, yet significantly faster than RAM.
  • Level 3 is in the CPU or near it on the motherboard: furthest away, largest and slowest cache, still faster than RAM.
  • When the CPU needs something, it checks the cache levels before going to RAM. Finding it in cache is quicker.
  • Have a goThe CPU needs an instruction. Level 1 doesn't have it, but level 2 does. Does the CPU still have to go to RAM?

    No. It's been found in a cache level, so the trip to RAM is skipped.

    The CPU only needs RAM when none of the cache levels has what it's looking for. Level 2 is slower than level 1, but still faster than RAM.

  • Anything fetched from RAM is copied into level 3, level 2 and finally level 1, pushing out older, less frequently used data.
  • Have a goThe CPU has just fetched an instruction from RAM, and a moment later it needs the same instruction again. Where is the first place it's likely to find it?

    Level 1 cache.

    The copy has gone down through level 3 and level 2 into level 1, which is the first place the CPU checks, so no second trip to RAM is needed.

  • A larger cache can improve speed. But cache is built into the CPU chip, so users generally can't increase it.

The big picture

Cache is a small, very fast memory in or very close to the CPU. It keeps copies of frequently used instructions and data, so the CPU can often avoid the slower trip to RAM. There are three levels: level 1 is the smallest and fastest, level 3 the largest and slowest of the three, and all of them are faster than RAM. A larger cache can improve performance, but cache is built into the CPU, so a user generally can't add more.

Key points

1Cache: small, very fast memory in or very close to the CPU, holding copies of frequently used instructions and data.
2Cache beats RAM on speed; RAM beats cache on capacity.
3Three levels: level 1 smallest and fastest, level 2 in the middle, level 3 largest and slowest, all faster than RAM.
4Lookup order: level 1, level 2, level 3, then RAM. Items fetched from RAM are copied up into the cache levels.
5More cache can mean fewer trips to RAM and less waiting, but cache size is fixed when the CPU is made.

Worked example

Problem

The CPU needs instruction A, which is already in level 1 cache. Next it needs instruction B, which isn't in any cache level. Straight after that, it needs B again. Which of these three requests is slowest, and why are the other two quicker?

⚠ Watch out

Thinking a bigger cache level must also be a faster one. It's the other way round: level 1 is the smallest and the fastest, and each level after it is larger but slower.

🧠

Memory hook

1, 2, 3, then RAM: each stop on the route is bigger and slower than the one before, and RAM is the long trip at the end.

✓

Check yourself

Cover the page. In two or three sentences, explain why cache can make a computer faster even though it is so small, then check your answer against the lesson.

Flashcards

(14)
What is cache?
A small, very fast memory in or very close to the CPU that keeps copies of frequently used instructions and data.
Why does fetching from RAM take longer than fetching from cache?
RAM is near the CPU but not inside it, so data and instructions take time to travel along the buses.
Cache vs RAM: which is faster, and which is bigger?
Cache is faster. RAM has the larger capacity.
How many levels of cache are there?
Three: level 1, level 2 and level 3.
Where is each cache level usually found?
Levels 1 and 2 are usually part of the CPU (level 2 further away). Level 3 is part of the CPU or near it on the motherboard.
Which cache level is fastest, and which has the largest capacity?
Level 1 is the fastest (and smallest). Level 3 has the largest capacity (and is the slowest cache level).
Is level 3 cache faster or slower than RAM?
Faster. Even the slowest level of cache is faster than RAM.
Typical sizes of the three cache levels?
Level 1: tens or hundreds of KB (e.g. 64 KB). Level 2: e.g. 512 KB to 4 MB. Level 3: e.g. 8 MB to 32 MB or more. They vary between processors.
In what order does the CPU look for an instruction?
Level 1, then level 2, then level 3, and only then RAM.
What happens to data the CPU has to fetch from RAM?
It's copied into level 3, level 2 and finally level 1, pushing out older, less frequently used data, so it's ready next time.
Why can a larger cache make a computer faster?
It can hold more frequently used items, so they're more likely to be found in cache: fewer trips to RAM, less waiting.
Can a user usually increase the cache size?
Generally not. Cache is physically built into or onto the CPU chip when it's manufactured.
Does cache mean instructions no longer need to be stored in RAM?
No. Cache holds copies; the instructions are still in RAM.
Is cache a type of main memory?
No. Main memory is RAM and ROM. Cache is a separate small, fast memory in or very close to the CPU.

Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.

Learning with Lightbulb is opening soon

You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.

Keep me posted

More AQA GCSE Computer Science topics

See the full AQA Computer Science curriculum →

How this lesson was checked. This AQA GCSE Computer Science (specification 8525)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 4 November 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.