Hardware, Memory & Number Systems
🔒 Log in to trackMemory hierarchy, RAM/ROM and cache
🔒 Log in to trackStorage is arranged by speed vs cost vs size. Going up the ladder: faster, costlier, smaller.
| Level | Example | Volatile? | Typical size |
|---|---|---|---|
| Registers | Inside CPU | Yes | Bytes |
| Cache (L1/L2/L3) | SRAM on/near CPU | Yes | KB - MB |
| Main memory | RAM (DRAM) | Yes | GB |
| Solid-state storage | SSD, pen drive | No | GB - TB |
| Magnetic/optical | HDD, DVD | No | GB - TB |
| Archival | Magnetic tape, cloud cold storage | No | TB - 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.
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:
| Level | Technology | Volatile? | Typical size |
|---|---|---|---|
| Registers | Inside the CPU | Yes | Bytes |
| Cache (L1/L2/L3) | SRAM, on/near the CPU | Yes | KB to MB |
| Main memory | RAM (DRAM) | Yes | GB |
| SSD | Flash chips | No | 100s of GB |
| Hard disk / tape | Magnetic | No | TB |
Climbing up = faster, costlier, smaller. The CPU keeps its most-wanted data as high on this ladder as possible.
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.
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:
| Type | Full form | Trait |
|---|---|---|
| SRAM | Static RAM | Flip-flop cells, no refresh needed, fast, costly → used for cache |
| DRAM | Dynamic RAM | One transistor + capacitor per bit; the capacitor leaks, so it needs constant refreshing; cheaper, denser → used for main memory |
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:
| Type | Written | Erased |
|---|---|---|
| PROM | Once, by the user/manufacturer | Never |
| EPROM | Reprogrammable | Ultraviolet (UV) light |
| EEPROM | Reprogrammable | Electrically, in circuit |
| Flash | Reprogrammable in blocks | Electrically (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.
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.
Question types you will see
Each type: how to recognise it, the method step by step, and one question to try.
Volatile vs non-volatile identification
'Which of these is volatile?', 'content of which memory is lost on power failure?', statement lists mixing RAM, ROM, cache, disk.
Volatile = vanishes with power: registers, cache, RAM (SRAM and DRAM both).
Non-volatile: ROM and its family, flash (SSD, pen drive), magnetic disk, DVD.
In statement questions, test each memory against this split — ROM is never volatile.
Which of the following is non-volatile?
Show solutionHide solution
ROM — it keeps its content without power. RAM, cache and registers are all volatile.
Hierarchy ordering and cache position
Arrange memories by speed or size, or identify the memory between CPU and RAM, or the levels L1/L2/L3.
Speed order: Registers > Cache > RAM > SSD > HDD > Tape; size order is the exact reverse.
Cache = small SRAM buffer between CPU and RAM; L1 smallest-fastest, then L2, L3.
'Smallest but fastest' always points to registers, not cache.
Arrange by access speed (fastest first): RAM, Registers, Hard disk, Cache
Show solutionHide solution
Registers → Cache → RAM → Hard disk. Each step down trades speed for size and cheapness.
SRAM vs DRAM
'Why does DRAM need refreshing?', 'which RAM is used in cache?', 'SRAM vs DRAM statements'.
DRAM stores each bit in a capacitor that leaks charge → needs constant refreshing; cheaper, denser → main memory.
SRAM uses flip-flops, no refresh, faster, costlier → cache.
S = Static (stands still), D = Dynamic (must be refreshed).
DRAM needs to be refreshed periodically because —
Show solutionHide 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.
ROM family: PROM / EPROM / EEPROM / firmware
'EPROM is erased by…', 'EEPROM differs from EPROM because…', 'where is the BIOS stored?', 'which ROM can be programmed only once?'
Erasing ladder: PROM (never) → EPROM (UV light) → EEPROM (electrically) → flash (electrically, in blocks).
BIOS/firmware lives in ROM/flash — non-volatile by definition.
'Programmed only once' = PROM; 'electrically erasable' = EEPROM.
Which memory is used to store the BIOS firmware of a PC?
Show solutionHide solution
A ROM/flash (EEPROM-type) chip on the motherboard — the firmware must survive every power cut, so volatile RAM is impossible.
Cache and virtual memory concepts
'Virtual memory is…', 'cache memory is placed…', 'which is faster, L1 or L3?', 'cache is made of which RAM?'.
Cache = SRAM buffer between CPU and RAM; L1 (inside the core) fastest-smallest, then L2, L3.
Virtual memory = disk space used as RAM overflow — big but slow, not physical RAM.
Trap: 'virtual memory is part of RAM' — false; it lives on the storage disk.
Virtual memory is best described as —
Show solutionHide 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.
Shortcuts that save time
Volatile memories Vanish when power goes: registers, cache, RAM. Everything you keep files on (ROM, SSD, HDD, pen drive) is non-volatile.
Which is volatile - ROM or DRAM?
Show solutionHide solution
DRAM. ROM = Read Only Memory 'Remembers' even without power.
PROM (once) -> EPROM (Erase with Photons = UV) -> EEPROM (Electrically Erasable). The more E's, the more Electrical.
How is EPROM erased?
Show solutionHide solution
Exposure to ultraviolet light through the quartz window.
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.
Memory placed between CPU and RAM?
Show solutionHide solution
Cache memory (SRAM).
Mistakes to avoid
Where most students lose marks on this subtopic.
Calling ROM volatile - RAM is volatile, ROM is not.
Saying cache is bigger than RAM - cache is tiny but fast.
Believing virtual memory is physical RAM - it is disk space acting as RAM overflow.
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.
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.