1. Primary Storage
Why does a computer even need it?
Think of the CPU as a chef cooking a meal. The chef can't run to the supermarket (secondary storage) every time they need an ingredient mid-recipe — that's way too slow. Instead, they keep the ingredients they're actively using on the counter right next to them. That counter is primary storage.
Primary storage is directly connected to the CPU, so access times are dramatically faster than secondary storage. This matters because every single instruction the CPU runs goes through the Fetch-Execute Cycle — and if the CPU had to wait for a slow hard disk every single time, your computer would grind to a halt.
The catch: fast memory is expensive to make, so we can only afford a little of it. That's why RAM is sold in gigabytes (16GB, 32GB) while hard drives are sold in terabytes (1000s of GB).
| Primary Storage | Secondary Storage |
| Volatile (except ROM) | Non-volatile |
| Small capacity | Large capacity |
| Very fast access | Slower access |
| Expensive per GB | Cheap per GB |
Practice Question
Why does a computer need primary storage instead of just using secondary storage for everything?
RAM — Random Access Memory
RAM is the computer's short-term working memory. It holds whatever the CPU is currently using — the open apps, the current file, the parts of the operating system that are running right now.
RAM in 4 words: Volatile · Read/Write · Fast · Large(ish) capacity compared to ROM.
Volatile means: turn the power off, and everything in RAM disappears instantly. That's why you lose unsaved work in a power cut — it was only ever sitting in RAM, never written to a permanent disk.
Before the CPU can use any data or instruction, it has to first be copied from secondary storage into RAM. That's literally what "loading" a program means.
Real-world example
A smart TV streaming a show keeps the current video buffer, the volume level, and the running apps in RAM. Turn the TV off and back on, and none of that "current state" survives — it has to reload.
Practice Question
Give two examples of data a smart TV might store in RAM while streaming a video. [2]
2. Secondary Storage