To compare memory and storage, follow a task from start to finish and ask at each step: is this being used right now (memory), kept for later (storage), or built in permanently (ROM)?
This lesson follows the roles of the registers inside hardware and processing. It also connects to the sizes of stored files in images, sound and storage.
How do RAM, ROM and secondary storage differ?
| RAM | ROM | Secondary storage | |
|---|---|---|---|
| Purpose | Holds programs and data in use | Holds fixed start-up instructions | Keeps programs and files long term |
| Volatile? | Yes, lost when power is off | No | No |
| Written to? | Yes, constantly | Not during normal use | Yes, when you save |
| Directly used by the processor? | Yes | Yes | No, data is loaded into RAM first |
| Relative size and speed | Smaller, much faster | Small | Larger, slower |
Examples of secondary storage include a hard disk drive (magnetic), a solid state drive (flash, no moving parts) and an optical disc. Which suits a situation depends on the task: capacity, speed, robustness, portability and cost.
Worked example
A student edits a school project video on a laptop with 8 GB of RAM. The raw clips are stored on the laptop’s solid state drive. The editing program needs 3 GB, the operating system uses 2 GB and the open video project uses 1.5 GB while editing.
Step 1, where are the clips kept? On the secondary storage (the drive). They stay there when the laptop is off.
Step 2, what is in RAM during editing? The editing program, the operating system parts in use and the part of the project being worked on.
Step 3, how much RAM is used? 3 + 2 + 1.5 = 6.5 GB, so 8 − 6.5 = 1.5 GB is free.
Step 4, what if the student opens a browser needing 2 GB? 6.5 + 2 = 8.5 GB, which is more than 8 GB. The computer would use virtual memory, swapping data between RAM and the drive, and the laptop slows down.
Step 5, what role does ROM play? When the laptop is switched on, the start-up instructions in ROM run first and begin loading the operating system into RAM.
The mistake to watch for
A common error is to say that RAM is where files are saved, or that saving a document puts it in RAM.
Mistaken answer: “When I save my essay, it is stored in RAM so I can open it tomorrow.”
RAM is volatile, so the essay would vanish when the power is off.
Saving copies the file to secondary storage. Opening it loads a copy back into RAM.
Say “saved to secondary storage, loaded into RAM to edit” and you will keep the two apart. Also avoid the everyday advert habit of calling storage “memory” in an exam answer.
Check yourself
1. Where is a game’s saved progress kept when the console is switched off?
Show answer
In secondary storage, because it must survive without power. RAM would lose it.
2. A laptop has 4 GB of RAM. Three programs need 1.2 GB, 2.5 GB and 0.8 GB. Do they fit at the same time?
Show answer
1.2 + 2.5 + 0.8 = 4.5 GB, which is more than 4 GB, so they do not all fit. Virtual memory would be used and the computer would slow down.
3. Why does a computer keep its start-up instructions in ROM rather than RAM?
Show answer
ROM is non-volatile, so the instructions are still there when the power comes on. RAM would be empty at that moment.
Where this leads next
Next, explain an input-output choice, then check your understanding with the practice set. The mistake log and retest queue is useful for recording any term swaps you make.
Some students understand these differences but struggle to write them as a clear, scenario-based answer. That is a skill our teachers build in online one-to-one Computer Science tuition.