AQA GCSE Computer Science (8525), section 3.4.5 (Systems architecture)
Types of memory in a computer
| Type | What it is | Used for |
|---|---|---|
| Register | tiny, very fast storage inside the CPU | the data and instructions being worked on right now |
| Cache | small, fast memory in or close to the CPU | frequently used data and instructions |
| RAM (random access memory) | main memory, fast | the programs and data currently in use |
| ROM (read only memory) | main memory with fixed contents | the start-up (boot) instructions |
Registers are the fastest, then cache, then RAM, then secondary storage. The faster the memory, the smaller and more expensive it is, which is why the computer uses a mixture.
Volatile and non-volatile
- Volatile memory loses its contents when the power is off. RAM is volatile.
- Non-volatile memory keeps its contents with no power. ROM and secondary storage are non-volatile.
RAM and ROM
| RAM | ROM | |
|---|---|---|
| Read and write? | both | read only |
| Volatile? | yes | no |
| Contents | programs and data in use, which change | start-up instructions, which do not change |
| Size | larger | small |
ROM holds the program that starts the computer (bootstrap), loading the operating system into RAM.
Main memory and secondary storage
Main memory is any memory the CPU can access directly (except cache and registers): RAM and ROM.
Secondary storage is any non-volatile storage that the CPU cannot access directly, such as a hard drive or SSD.
| Main memory (RAM) | Secondary storage | |
|---|---|---|
| Speed | fast | slower |
| Volatile? | yes | no |
| Capacity | smaller | larger |
| Cost per GB | higher | lower |
| Accessed | directly by the CPU | only after loading into RAM |
Why secondary storage is needed
RAM loses its data when the power is off, so computers need permanent storage for the operating system, programs and files. It is also larger and cheaper per gigabyte.
Example
When you open a document, it is copied from secondary storage into RAM, where the CPU can use it quickly.
Common mistake: saying RAM is "temporary storage" without explaining that it is volatile (loses data when the power goes off). Also, do not mix up ROM (read only) with RAM (read and write), and remember that ROM is non-volatile.
Exam tip: use the words volatile and non-volatile correctly. When comparing RAM and ROM or main and secondary, make one point about each.
Check yourself
What does volatile mean?
The memory loses its contents when the power is turned off.
What is stored in ROM?
The start-up (boot) instructions that do not change.
Why do computers need secondary storage as well as RAM?
RAM is volatile and limited in size, so a permanent, larger store is needed for programs and files.