ExamShortcut

Hardware, Memory & Number Systems

🔒 Log in to track
high importance7 formulas⚡ 14 shortcuts6 subtopics
All subtopics·Subtopic 1 of 6

Memory hierarchy, RAM/ROM and cache

🔒 Log in to track
⏱ 5 min read🧩 5 question types🎯 15 practice Q
The idea in one minute

Storage is arranged by speed vs cost vs size. Going up the ladder: faster, costlier, smaller.

LevelExampleVolatile?Typical size
RegistersInside CPUYesBytes
Cache (L1/L2/L3)SRAM on/near CPUYesKB - MB
Main memoryRAM (DRAM)YesGB
Solid-state storageSSD, pen driveNoGB - TB
Magnetic/opticalHDD, DVDNoGB - TB
ArchivalMagnetic tape, cloud cold storageNoTB - PB

RAM (volatile - contents vanish at power-off): SRAM - fast, costly, no refresh, used for cache; DRAM - slower, cheap, needs constant refreshing, used for main memory.

ROM (non-volatile, firmware): PROM (programmed once) -> EPROM (erased by UV light) -> EEPROM (erased electrically; the BIOS chip is EEPROM/flash). Flash memory (pen drives, SSDs) is electrically erasable like EEPROM but block-wise.

Cache memory sits between CPU and RAM and keeps copies of frequently used data (L1 smallest/fastest, L3 largest/slowest of the three). Virtual memory uses a disk area (page file) as an overflow extension of RAM - slow but lets big programs run.

01

The memory ladder

Computer memory is a trade-off: the faster a memory is, the smaller and costlier it is. So machines stack several kinds, from tiny-fast to huge-slow:

LevelTechnologyVolatile?Typical size
RegistersInside the CPUYesBytes
Cache (L1/L2/L3)SRAM, on/near the CPUYesKB to MB
Main memoryRAM (DRAM)YesGB
SSDFlash chipsNo100s of GB
Hard disk / tapeMagneticNoTB

Climbing up = faster, costlier, smaller. The CPU keeps its most-wanted data as high on this ladder as possible.

02

Volatile vs non-volatile

  • Volatile memory loses its content when power goes off: registers, cache, RAM. The Vol Vanishes rule.
  • Non-volatile keeps data without power: ROM, flash (SSD, pen drive, memory card), hard disk, DVD.
03

RAM — the working desk

RAM holds the programs and data currently in use; it is read and written freely but wiped at power-off. Two flavours:

TypeFull formTrait
SRAMStatic RAMFlip-flop cells, no refresh needed, fast, costly → used for cache
DRAMDynamic RAMOne transistor + capacitor per bit; the capacitor leaks, so it needs constant refreshing; cheaper, denser → used for main memory
04

ROM family — the printed pages

ROM (Read Only Memory) is non-volatile; ordinary programs can only read it. Its family differs only in how it can be written/erased:

TypeWrittenErased
PROMOnce, by the user/manufacturerNever
EPROMReprogrammableUltraviolet (UV) light
EEPROMReprogrammableElectrically, in circuit
FlashReprogrammable in blocksElectrically (fast) — SSDs and pen drives are flash

The PC's start-up firmware (BIOS/UEFI) lives in ROM/flash — that is why it survives every power cut.

05

Two bridge concepts

  • Cache — a small SRAM buffer between CPU and RAM (L1 inside the core is fastest and smallest, then L2, then L3). It keeps copies of recently used data so the CPU rarely waits for slow RAM.
  • Virtual memory — when RAM is full, the OS uses disk space as extra RAM (page file). It saves the machine from crashing but is far slower than real RAM. It is not physical memory.
06

Question types you will see

Each type: how to recognise it, the method step by step, and one question to try.

Type 1very common2 practice Q

Volatile vs non-volatile identification

How to spot it:

'Which of these is volatile?', 'content of which memory is lost on power failure?', statement lists mixing RAM, ROM, cache, disk.

Method
  1. Volatile = vanishes with power: registers, cache, RAM (SRAM and DRAM both).

  2. Non-volatile: ROM and its family, flash (SSD, pen drive), magnetic disk, DVD.

  3. In statement questions, test each memory against this split — ROM is never volatile.

Try this

Which of the following is non-volatile?

Show solution

ROM — it keeps its content without power. RAM, cache and registers are all volatile.

Type 2very common3 practice Q

Hierarchy ordering and cache position

How to spot it:

Arrange memories by speed or size, or identify the memory between CPU and RAM, or the levels L1/L2/L3.

Method
  1. Speed order: Registers > Cache > RAM > SSD > HDD > Tape; size order is the exact reverse.

  2. Cache = small SRAM buffer between CPU and RAM; L1 smallest-fastest, then L2, L3.

  3. 'Smallest but fastest' always points to registers, not cache.

Try this

Arrange by access speed (fastest first): RAM, Registers, Hard disk, Cache

Show solution

Registers → Cache → RAM → Hard disk. Each step down trades speed for size and cheapness.

Type 3common2 practice Q

SRAM vs DRAM

How to spot it:

'Why does DRAM need refreshing?', 'which RAM is used in cache?', 'SRAM vs DRAM statements'.

Method
  1. DRAM stores each bit in a capacitor that leaks charge → needs constant refreshing; cheaper, denser → main memory.

  2. SRAM uses flip-flops, no refresh, faster, costlier → cache.

  3. S = Static (stands still), D = Dynamic (must be refreshed).

Try this

DRAM needs to be refreshed periodically because —

Show solution

Each DRAM bit sits in a tiny capacitor that gradually loses its charge, so the cells are re-read and re-written thousands of times a second to keep the data alive.

Type 4common2 practice Q

ROM family: PROM / EPROM / EEPROM / firmware

How to spot it:

'EPROM is erased by…', 'EEPROM differs from EPROM because…', 'where is the BIOS stored?', 'which ROM can be programmed only once?'

Method
  1. Erasing ladder: PROM (never) → EPROM (UV light) → EEPROM (electrically) → flash (electrically, in blocks).

  2. BIOS/firmware lives in ROM/flash — non-volatile by definition.

  3. 'Programmed only once' = PROM; 'electrically erasable' = EEPROM.

Try this

Which memory is used to store the BIOS firmware of a PC?

Show solution

A ROM/flash (EEPROM-type) chip on the motherboard — the firmware must survive every power cut, so volatile RAM is impossible.

Type 5common3 practice Q

Cache and virtual memory concepts

How to spot it:

'Virtual memory is…', 'cache memory is placed…', 'which is faster, L1 or L3?', 'cache is made of which RAM?'.

Method
  1. Cache = SRAM buffer between CPU and RAM; L1 (inside the core) fastest-smallest, then L2, L3.

  2. Virtual memory = disk space used as RAM overflow — big but slow, not physical RAM.

  3. Trap: 'virtual memory is part of RAM' — false; it lives on the storage disk.

Try this

Virtual memory is best described as —

Show solution

Disk space managed by the OS as an overflow area when RAM fills up (the page file) — it prevents crashes but works far slower than real RAM.

07

Shortcuts that save time

⚡ Volatile = Vanishes

Volatile memories Vanish when power goes: registers, cache, RAM. Everything you keep files on (ROM, SSD, HDD, pen drive) is non-volatile.

Example

Which is volatile - ROM or DRAM?

Show solution

DRAM. ROM = Read Only Memory 'Remembers' even without power.

⚡ ROM family eraser

PROM (once) -> EPROM (Erase with Photons = UV) -> EEPROM (Electrically Erasable). The more E's, the more Electrical.

Example

How is EPROM erased?

Show solution

Exposure to ultraviolet light through the quartz window.

⚡ Cache position

Cache is the CPU's personal notepad between CPU and RAM: L1 inside the core (fastest), then L2, then L3 shared. Any question 'memory between CPU and main memory' = cache.

Example

Memory placed between CPU and RAM?

Show solution

Cache memory (SRAM).

08

Mistakes to avoid

Where most students lose marks on this subtopic.

Mistake 01

Calling ROM volatile - RAM is volatile, ROM is not.

Mistake 02

Saying cache is bigger than RAM - cache is tiny but fast.

Mistake 03

Believing virtual memory is physical RAM - it is disk space acting as RAM overflow.

09

Quick revision

Read this the night before the exam.

  • Ladder (fast→slow): Registers → Cache (SRAM) → RAM (DRAM) → SSD → HDD → Tape.

  • Volatile = vanishes: registers, cache, RAM. Non-volatile: ROM, flash, disk.

  • SRAM = cache (fast, no refresh); DRAM = main RAM (cheap, needs refresh).

  • PROM once → EPROM (UV erase) → EEPROM (electrical erase) → flash (blocks).

  • Virtual memory = disk acting as RAM overflow, not real RAM.

10

Practice: 15 questions

Sets of 10, mixed across the question types above. Every answer has a step-by-step explanation.

Topic test · 10 questions

Suggested time 5 min · wrong answers go to your mistake notebook automatically.