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
⏱ 4 min read🧩 6 question types🎯 15 practice Q
The idea in one minute

A computer keeps data in several kinds of memory. The faster a memory is, the smaller and costlier it is. So the machine stacks them like a ladder: tiny and fast at the top, huge and slow at the bottom. Some memory forgets everything at power-off (volatile). The rest keeps its data.

01

The memory ladder

Fast memory costs more, so a computer has only a little of it. It stacks the types from fast and small to slow and large.

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

Going up the ladder means faster, costlier and smaller.

Tip: Speed order is Registers, Cache, RAM, SSD, HDD, Tape. Size order is the exact reverse.

02

Volatile and non-volatile

Volatile memory loses its data when the power goes off. Registers, cache and RAM are volatile.

Non-volatile memory keeps data without power. ROM, flash (SSD, pen drive, memory card), hard disk and DVD are non-volatile.

Rule: ROM is never volatile. Both SRAM and DRAM are volatile.

03

RAM, the working desk

RAM holds the programs and data in use right now. You can read and write it freely. Power-off wipes it.

TypeFull formMain facts
SRAMStatic RAMFlip-flop cells. No refresh needed. Fast and costly. Used for cache.
DRAMDynamic RAMOne transistor and one capacitor per bit. Cheaper and denser. Used for main memory.

A DRAM capacitor leaks its charge. So DRAM needs constant refreshing. SRAM does not.

04

The ROM family

ROM means Read Only Memory. It is non-volatile, and ordinary programs can only read it. The family differs in how each chip is written and erased.

TypeWrittenErased
PROMOnceNever
EPROMReprogrammableUltraviolet (UV) light
EEPROMReprogrammableElectrically, in the circuit
FlashReprogrammable in blocksElectrically (fast)

SSDs and pen drives are flash. The start-up firmware of a PC (BIOS or UEFI) sits in ROM or flash. That is why it survives every power cut.

Tip: More E's mean more electricity. EPROM is erased by UV light. EEPROM is erased electrically.

05

Cache and virtual memory

Cache is a small SRAM buffer between the CPU and RAM. It keeps copies of recently used data. So the CPU rarely waits for slow RAM. L1 is smallest and fastest. Then comes L2, then L3.

Virtual memory uses disk space as extra RAM when RAM is full. It is called the page file. It stops the machine from crashing. But it is far slower than real RAM.

Watch: Virtual memory is not physical memory. It lives on the storage disk, not inside RAM.

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:

The words 'volatile', 'non-volatile', 'loses data when power is off' or 'permanent'.

Method
  1. Sort each option into volatile or non-volatile.

  2. Volatile: registers, cache, RAM (SRAM and DRAM).

  3. Non-volatile: ROM family, flash, magnetic disk, DVD.

  4. In statement questions, test each memory against this split.

Why it works:

Only memory that needs power to hold its data is volatile.

Try this

Which of the following is non-volatile?

Show solution
  1. RAM, cache and registers all lose data at power-off.

  2. ROM keeps its content without power.

Answer

ROM

Type 2very common3 practice Q

Hierarchy ordering and cache position

How to spot it:

'Arrange in order of speed', 'fastest', 'smallest' or 'between CPU and RAM'.

Method
  1. Write the order: Registers, Cache, RAM, SSD, HDD, Tape.

  2. Speed falls as you move right. Size grows.

  3. Cache is the SRAM buffer between CPU and RAM.

  4. 'Smallest but fastest' means registers, not cache.

Why it works:

Cost limits how much fast memory a machine can have.

Try this

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

Show solution
  1. Registers are inside the CPU, so they are fastest.

  2. Cache comes next, then RAM, then the hard disk.

Answer

Registers, Cache, RAM, Hard disk

Type 3very common2 practice Q

SRAM vs DRAM

How to spot it:

'Refresh', 'flip-flop', 'capacitor', 'static', 'dynamic' or 'used for cache'.

Method
  1. DRAM stores each bit in a capacitor that leaks, so it needs refreshing.

  2. DRAM is cheaper and denser. It is main memory.

  3. SRAM uses flip-flops. It is faster and costlier. It is cache.

  4. S is Static (stands still). D is Dynamic (must be refreshed).

Why it works:

The leaking capacitor is the reason DRAM needs refresh.

Try this

DRAM needs to be refreshed periodically because...

Show solution
  1. Each DRAM bit sits in a tiny capacitor.

  2. The capacitor slowly loses its charge.

  3. So the cells are re-read and re-written again and again.

Answer

Its capacitors leak charge

Type 4common2 practice Q

ROM family: PROM, EPROM, EEPROM, firmware

How to spot it:

'Programmed only once', 'ultraviolet', 'electrically erasable', 'BIOS' or 'firmware'.

Method
  1. Match the erase method: PROM never, EPROM UV light, EEPROM electrically.

  2. Flash is electrically erased, in blocks.

  3. 'Programmed only once' means PROM.

  4. BIOS or firmware lives in ROM or flash, because it must survive power cuts.

Why it works:

Each ROM type is defined by how it is erased.

Try this

Which memory holds the BIOS firmware of a PC?

Show solution
  1. Firmware must survive every power cut.

  2. So it cannot sit in volatile RAM.

Answer

A ROM or flash (EEPROM-type) chip

Type 5common3 practice Q

Cache and virtual memory concepts

How to spot it:

'Page file', 'overflow of RAM', 'L1, L2, L3' or 'copies of frequently used data'.

Method
  1. Cache is a small SRAM buffer between CPU and RAM.

  2. L1 is inside the core: fastest and smallest.

  3. Virtual memory is disk space used as RAM overflow.

  4. It is big but slow. It is not physical RAM.

Why it works:

Cache saves the CPU from waiting. Virtual memory saves the system from running out of RAM.

Try this

Virtual memory is best described as...

Show solution
  1. When RAM fills up, the OS uses disk space as an overflow area.

  2. That area is the page file.

Answer

Disk space used as an extension of RAM

Type 6occasional

Fastest, costliest or largest memory

How to spot it:

'Fastest memory', 'most expensive per byte' or 'largest capacity'.

Method
  1. Put the memories in ladder order.

  2. Fastest and costliest per byte is at the top: registers.

  3. Largest and cheapest per byte is at the bottom: tape and hard disk.

  4. Read the stem's word: fastest, smallest or largest.

Why it works:

Speed and cost rise together. Size falls.

Try this

Which memory in a computer is the fastest?

Show solution
  1. Registers are inside the CPU.

  2. They are the top rung of the ladder.

Answer

Registers

07

Shortcuts that save time

⚡ Volatile means 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
  1. ROM keeps data without power.

  2. DRAM loses data at power-off.

Answer

DRAM

⚡ ROM family eraser

PROM is written once. EPROM is erased by UV light. EEPROM is erased electrically. More E's, more electricity.

Example

How is EPROM erased?

Show solution

EPROM is the UV member of the family.

Answer

By ultraviolet light

⚡ Cache position

Any question that says 'memory between the CPU and main memory' points to cache. L1 is inside the core and fastest.

Example

Which memory sits between the CPU and RAM?

Show solution
  1. It holds copies of frequently used data.

  2. It is built from SRAM.

Answer

Cache memory

08

Mistakes to avoid

Where most students lose marks on this subtopic.

Mistake 01

Calling ROM volatile.

ROM keeps its data without power. It is non-volatile.

Mistake 02

Saying SRAM needs refreshing.

DRAM needs refreshing because its capacitors leak. SRAM does not.

Mistake 03

Using SRAM for main memory and DRAM for cache.

Cache uses fast, costly SRAM. Main memory uses cheaper DRAM.

Mistake 04

Treating virtual memory as part of RAM.

Virtual memory is disk space used as overflow. It is slower than RAM.

Mistake 05

Picking cache for 'smallest and fastest'.

Registers are smaller and faster than cache.

09

Quick revision

Read this the night before the exam.

  • Speed order: Registers, Cache (SRAM), RAM (DRAM), SSD, HDD, Tape.

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

  • SRAM is for cache (fast, no refresh). DRAM is for main memory (cheap, needs refresh).

  • PROM once, EPROM UV erase, EEPROM electrical erase, flash in blocks.

  • BIOS or UEFI firmware sits in ROM or flash.

  • Virtual memory is 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.