- Practice
- About 15 min
- 5 practice questions
Practice: CPU, RAM, ROM, cache and storage devices
Classify memory and storage quickly by volatility, speed and access method, and answer exam-style questions on CPU registers, cache, virtual memory and storage devices.
If something looks wrong, please tell us.
Memory questions test whether you can sort each kind of memory by a few properties: does it keep data without power, how fast is it, how big is it, and how is it accessed? With one table and a list of traps you can answer them in seconds.
One table for every memory question
| Memory | Primary or secondary | Volatile? | Speed | Typical use |
|---|---|---|---|---|
| Registers | Inside the CPU | Yes | Fastest | The instruction and data being worked on now |
| Cache | Primary | Yes | Very fast | Frequently used data, between CPU and RAM |
| RAM | Primary (main memory) | Yes | Fast | Programs and data in use |
| ROM | Primary | No | Fast to read | Start-up firmware |
| Hard disk (HDD) | Secondary | No | Slower; moving parts | Large permanent storage |
| SSD and pen drive | Secondary | No | Faster than HDD; no moving parts | Permanent storage using flash memory |
| CD, DVD, Blu-ray | Secondary (optical) | No | Slow | Distribution and archives, read by laser |
| Magnetic tape | Secondary | No | Slowest; sequential access | Large backups |
CPU registers you should know
- Program counter: holds the address of the next instruction to be fetched.
- Instruction register: holds the instruction being decoded and executed now.
- Accumulator: holds the results of the ALU's calculations for the moment.
Common traps
- The hard disk is not primary memory, even though it is inside the cabinet. Primary memory is RAM, ROM and cache.
- Cache is faster than RAM but much smaller. It does not replace RAM.
- ROM can sometimes be rewritten: EPROM with ultraviolet light, EEPROM and flash electrically. 'Read only' describes normal use.
- Virtual memory is part of the secondary storage that the operating system uses as if it were extra RAM when RAM is full. It is slower than real RAM.
- Access methods: RAM and disks are direct (random) access, so any location can be reached directly; magnetic tape is sequential access, so it must be wound past earlier data.
- The BIOS is firmware stored in ROM or flash, not an application and not the operating system.
Worked example 1: the power cut
Meena types a page for an hour without saving. The power fails and the page is gone, but yesterday's saved file is still on the computer. Reasoning: the unsaved page was only in RAM, which is volatile, so it disappeared with the power. The saved file was on the hard disk or SSD, which is non-volatile. Lesson for exams: 'lost on power cut' always points to RAM.
Worked example 2: sort the statements
- 'It is used to start the computer and keeps its contents without power.' Non-volatile plus start-up: ROM.
- 'It is the fastest memory and is located inside the processor.' Registers.
- 'It sits between the CPU and RAM and stores frequently used instructions.' Cache.
- 'Data must be read in order, from the beginning.' Sequential access: magnetic tape.
- 'The operating system uses part of the disk when RAM runs out.' Virtual memory.
Worked example 3: choose the device
A student wants to carry files between home and a cyber café, change them often and avoid moving parts. Options: DVD, magnetic tape, pen drive, ROM chip. A DVD is not convenient to rewrite often, tape is for backups, and a ROM chip is not a carrying device. A pen drive uses rewritable flash memory and has no moving parts. Answer: pen drive.
Volatile: registers, cache, RAM. Non-volatile: ROM and all secondary storage. Speed falls and size grows: registers, cache, RAM, SSD/HDD, optical, tape. Tape = sequential access.
Key takeaways: decide volatility first, then speed, then access method. Primary memory is RAM, ROM and cache; everything you save permanently is secondary storage. The program counter holds the address of the next instruction.
Check your understanding
-
1. Meena loses an unsaved document when the power fails, but her saved files are safe. This is because:
- ROM is volatile
- RAM is volatile
- The hard disk is volatile
- Cache is non-volatile
Show answer
Answer: B. The unsaved work existed only in RAM, which loses its contents without power. Saved files are on the hard disk or SSD, which are non-volatile. ROM is non-volatile and cache is volatile, so the other statements are false.
-
2. Which storage medium allows only sequential access to data?
- Magnetic tape
- Solid state drive
- RAM
- Hard disk
Show answer
Answer: A. Tape must be wound past earlier data to reach a later item, which is sequential access. RAM, SSDs and hard disks allow direct access to any location.
-
3. Which of these is NOT primary memory?
- RAM
- ROM
- Cache
- Hard disk drive
Show answer
Answer: D. Primary memory is RAM, ROM and cache, which the CPU accesses directly. A hard disk drive is secondary storage, even though it is inside the computer.
-
4. When RAM is full, the operating system uses part of the disk as if it were extra RAM. This is called:
- Cache memory
- Flash memory
- Virtual memory
- A register
Show answer
Answer: C. Virtual memory is disk space used as an extension of RAM. Cache is fast memory near the CPU, flash is a type of non-volatile chip memory, and a register is inside the CPU.
-
5. Which CPU register holds the address of the next instruction to be fetched?
- Accumulator
- Program counter
- Cache
- Hard disk
Show answer
Answer: B. The program counter keeps the address of the next instruction. The accumulator holds ALU results; cache and the hard disk are not registers.
Sign in to keep track of the lessons you finish.