• 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

MemoryPrimary or secondaryVolatile?SpeedTypical use
RegistersInside the CPUYesFastestThe instruction and data being worked on now
CachePrimaryYesVery fastFrequently used data, between CPU and RAM
RAMPrimary (main memory)YesFastPrograms and data in use
ROMPrimaryNoFast to readStart-up firmware
Hard disk (HDD)SecondaryNoSlower; moving partsLarge permanent storage
SSD and pen driveSecondaryNoFaster than HDD; no moving partsPermanent storage using flash memory
CD, DVD, Blu-raySecondary (optical)NoSlowDistribution and archives, read by laser
Magnetic tapeSecondaryNoSlowest; sequential accessLarge 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

  1. 'It is used to start the computer and keeps its contents without power.' Non-volatile plus start-up: ROM.
  2. 'It is the fastest memory and is located inside the processor.' Registers.
  3. 'It sits between the CPU and RAM and stores frequently used instructions.' Cache.
  4. 'Data must be read in order, from the beginning.' Sequential access: magnetic tape.
  5. '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. 1. Meena loses an unsaved document when the power fails, but her saved files are safe. This is because:

    1. ROM is volatile
    2. RAM is volatile
    3. The hard disk is volatile
    4. 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. 2. Which storage medium allows only sequential access to data?

    1. Magnetic tape
    2. Solid state drive
    3. RAM
    4. 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. 3. Which of these is NOT primary memory?

    1. RAM
    2. ROM
    3. Cache
    4. 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. 4. When RAM is full, the operating system uses part of the disk as if it were extra RAM. This is called:

    1. Cache memory
    2. Flash memory
    3. Virtual memory
    4. 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. 5. Which CPU register holds the address of the next instruction to be fetched?

    1. Accumulator
    2. Program counter
    3. Cache
    4. 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.

Privacy · Terms · Refunds · Delivery