Study notes
Memory units (binary convention used in exams)
| Unit | Equal to |
| 1 Nibble | 4 bits |
| 1 Byte | 8 bits |
| 1 Kilobyte (KB) | 1024 bytes (2¹⁰) |
| 1 Megabyte (MB) | 1024 KB (2²⁰ bytes) |
| 1 Gigabyte (GB) | 1024 MB (2³⁰ bytes) |
| 1 Terabyte (TB) | 1024 GB |
| 1 Petabyte (PB) | 1024 TB |
| 1 Exabyte (EB) | 1024 PB |
| 1 Zettabyte (ZB) | 1024 EB |
| 1 Yottabyte (YB) | 1024 ZB |
Order: bit < nibble < byte < KB < MB < GB < TB < PB < EB < ZB < YB. 1 KB = 1024 × 8 = 8192 bits. Disk makers often use decimal units (1 GB = 1000 MB), which is why a "1 TB" drive shows less space in Windows; strictly, the binary units are KiB, MiB, GiB.
Memory hierarchy (fastest to slowest)
| Level | Speed | Cost per bit | Capacity |
| CPU registers | Fastest | Highest | Bytes |
| Cache (L1, L2, L3) – SRAM | Very fast | High | KB to MB |
| Main memory (RAM) – DRAM | Fast | Medium | GB |
| SSD / Hard disk | Slower | Low | Hundreds of GB to TB |
| Optical discs, magnetic tape | Slowest | Lowest | Large, offline/backup |
Cache sits between the CPU and RAM and holds frequently used data. Virtual memory uses part of the disk (Windows pagefile.sys, Linux swap) when RAM is full – it is slower than real RAM.
Primary memory: RAM vs ROM
| Feature | RAM | ROM |
| Full form | Random Access Memory | Read Only Memory |
| Volatility | Volatile (data lost on power off) | Non-volatile |
| Use | Running programs and data currently in use | Firmware such as BIOS/UEFI and boot code |
| Read/write | Read and write | Mainly read |
Types of RAM
- SRAM (Static RAM) – flip-flops; no refresh needed; faster and costlier; used for cache.
- DRAM (Dynamic RAM) – capacitor + transistor per bit; must be refreshed thousands of times a second; used as main memory. SDRAM and DDR (DDR4, DDR5) are DRAM types.
Types of ROM
| Type | Full form | How it is written/erased |
| Mask ROM | – | Programmed at the factory; cannot be changed |
| PROM | Programmable ROM | Programmed once by the user |
| EPROM | Erasable PROM | Erased with ultraviolet light, then reprogrammed |
| EEPROM | Electrically Erasable PROM | Erased electrically, byte by byte |
| Flash | Type of EEPROM | Erased electrically in blocks; used in pen drives, SSDs, memory cards |
Secondary storage
- Hard Disk Drive (HDD) – magnetic platters; data in concentric tracks divided into sectors; tracks at the same position on all platters form a cylinder. Seek time = time for the head to reach the track; rotational latency = waiting for the sector to come under the head. Speed in RPM (5400, 7200).
- Solid State Drive (SSD) – flash memory, no moving parts, faster and shock-resistant.
- Magnetic tape – sequential access; cheap, used for backup and archives.
- Optical discs – read with a laser.
| Medium | Typical capacity | Laser |
| Floppy disk (3.5 inch) | 1.44 MB | – (magnetic) |
| CD | About 700 MB | Infrared (780 nm) |
| DVD single layer / dual layer | 4.7 GB / 8.5 GB | Red (650 nm) |
| Blu-ray single layer / dual layer | 25 GB / 50 GB | Blue-violet (405 nm) |
Access methods: random/direct access (RAM, disks) vs sequential access (tape). Primary memory is directly accessible by the CPU; secondary storage is not and must be loaded into RAM first.
Exam tip: "UV light" means EPROM; "electrically" means EEPROM; "once" means PROM; "refresh" means DRAM; "cache" means SRAM.