
Memory is the part of a computer that holds data and programs. Some memory is fast but forgets when power goes off, like RAM. Some is slower but keeps data for years, like a hard disk or a pen drive. Punjab Police papers ask about this topic often: memory units, primary vs secondary memory, RAM vs ROM, cache, and the parts of hard disks and magnetic tape.
Memory units and the two families of memory
From one bit to a terabyte, and primary vs secondary memory.
A bit (binary digit) is the smallest unit of data. It is a single 0 or 1. 4 bits make a nibble and 8 bits make a byte. One byte can hold one character, such as the letter A.
| Unit | Equals |
|---|---|
| 1 Kilobyte (KB) | 1024 bytes |
| 1 Megabyte (MB) | 1024 KB |
| 1 Gigabyte (GB) | 1024 MB |
| 1 Terabyte (TB) | 1024 GB |
| 1 Petabyte (PB) | 1024 TB |
| Then Exabyte (EB), Zettabyte (ZB), Yottabyte (YB) | Each is 1024 of the one before |
"Kind Men Give To Poor" = KB → MB → GB → TB → PB (small to big).
RAM and ROM: the two kinds of primary memory
Volatile vs non-volatile, SRAM vs DRAM, and the ROM family.
Volatile memory needs power to keep its data. When power goes, the data is lost. RAM and cache are volatile. Non-volatile memory keeps data without power. ROM, flash memory, SSD and hard disk are non-volatile.
| ROM type | Full form | How it is written or erased |
|---|---|---|
| ROM (mask ROM) | Read Only Memory | Written once at the factory. Cannot be changed. |
| PROM | Programmable ROM | The user can write it only once. |
| EPROM | Erasable Programmable ROM | Erased with ultraviolet (UV) light, then written again. |
| EEPROM | Electrically Erasable Programmable ROM | Erased electrically, without taking the chip out. |
| Flash memory | A kind of EEPROM | Erased in large blocks. Used in pen drives, SSDs, memory cards and BIOS chips. |

The memory hierarchy and cache
Fast and small at the top, slow and big at the bottom.
- fastestRegistersInside the CPU. Fastest and smallest.
- Cache (L1 → L2 → L3)Very fast SRAM between the CPU and RAM.
- Main memory (RAM)Holds the programs that are open now.
- SSD / hard diskKeeps all your files, even when switched off.
- slowestCD/DVD, magnetic tapeBackup and archives. Slowest, cheapest per GB.
Cache is a small, very fast memory between the CPU and RAM. It keeps copies of the data and instructions the CPU uses most. L1 is the smallest and fastest, inside each core. L2 is bigger and a little slower. Many CPUs also have a shared L3. If the CPU does not find an instruction in L1 but finds it in L2, the instruction is first copied from L2 into L1, and the CPU then uses it.
RAM forgets everything in a power cut.
Costs more per GB than a disk.
A few GB, not TB.
Nanoseconds. That is why the CPU works from it.
"Slow access" is not a trait of internal memory. It is fast.
Secondary storage: magnetic, optical and flash
Three ways to keep data for years.

| Family | How it stores | Examples |
|---|---|---|
| Magnetic | Tiny magnetised spots on a coated surface | Hard disk, floppy disk, magnetic tape |
| Optical | Pits on a shiny layer, read by a laser | CD, DVD, Blu-ray |
| Flash (solid state) | Electric charge in chips; no moving parts | Pen drive, memory card, SSD |
A flash drive is also called a pen drive, USB drive or thumb drive. It uses flash memory, so it keeps data without power. It is secondary memory. Flash drives and memory cards are called memory storage devices.
- SSD, not "SDD". SSD = Solid State Drive. It replaces a hard disk inside the computer. It is not another name for a pen drive.
- DDR, SRAM are RAM (primary). Flash ROM holds firmware. Of these four, only the pen drive is secondary storage.
- "Light drive" and "pencil drive" are not real terms.
Inside a hard disk: tracks, sectors and access time
Platters, heads, and the three waits.

A circle on the platter. Tracks sit one inside another.
A pie-shaped segment of a track. Classically 512 bytes.
The same track number on every platter, one above another.
"Segment" is not a disk term. A disk pack is a stack of several platters on one spindle.
- 1Seek timeThe head moves to the right track.
- 2LatencyThe disk spins the right sector under the head. Also called rotational delay.
- 3Transfer timeThe data is read or written. It depends on the transfer rate.
"Seek the street, wait for the house, then walk in." Seek = go to the track. Latency = wait for the sector. Transfer = read the data.
- A hard disk drive is also called a hard drive, fixed disk or simply a disk drive. It is secondary storage, so "primary drive" is wrong.
- A disk is a direct (random) access device: the head can jump straight to any track. A tape is sequential: you must wind past everything before it.
Magnetic tape: channels, frames and blocking
Old, slow, cheap, and still asked.
A tape drive needs blank tape each time it starts and stops. So records are grouped: two or more records joined into one block is called blocking. The number of records in a block is the blocking factor. The blank space between two blocks is the inter-block gap (IBG). Blocking saves tape and time.
Quick revision
Full forms, traps and one-line facts.
- RAM
- Random Access Memory
- ROM
- Read Only Memory
- PROM
- Programmable Read Only Memory
- EPROM
- Erasable Programmable Read Only Memory
- EEPROM
- Electrically Erasable Programmable Read Only Memory
- SRAM / DRAM
- Static RAM / Dynamic RAM
- DDR
- Double Data Rate
- SSD
- Solid State Drive
- HDD
- Hard Disk Drive
- CD / DVD
- Compact Disc / Digital Versatile Disc
- USB
- Universal Serial Bus
- IBG
- Inter-Block Gap
- RAM is primary, never secondary. Flash memory (pen drive) is secondary.
- Volatile = needs power. Don't flip it: RAM forgets, ROM remembers.
- Seek = to the track. Latency = to the sector.
- Disk: tracks and sectors. Tape: channels and frames.
- Internal memory is fast, not slow.
Also asked onceTap to open
- A flash drive is also called a pen drive.
- Another name for a hard disk drive is disk drive.
- Flash drives and memory cards are examples of memory storage devices.
- Magnetic and optical memory are examples of secondary memory.
- The pie-shaped segments on a magnetic disk are sectors.
- The horizontal rows on a magnetic tape are channels.
Arrange from fastest to slowest: hard disk, cache, register, RAM. Then say which of them are volatile.
Show answer
Register → cache → RAM → hard disk. Registers, cache and RAM are volatile. The hard disk is non-volatile.


