Describe the operation of magnetic, optical and solid‑state storage devices, give examples of each type, and explain how they differ from primary (RAM/ROM) storage.
1. Primary vs. secondary storage
Primary storage – fast, volatile memory that the CPU can read or write directly while a program is running.
Random‑Access Memory (RAM): stores data and programmes temporarily; loses its contents when power is removed.
Read‑Only Memory (ROM): contains permanent instructions (e.g. BIOS); non‑volatile but normally cannot be rewritten by the user.
Secondary storage – non‑volatile devices that retain data when the computer is switched off. They store data on a separate medium (magnetic, optical or solid‑state) rather than in the CPU’s registers.
Why secondary storage is needed: primary storage is limited in capacity and loses data on power‑off, so larger, permanent media are required for programmes, documents, multimedia files and backups.
2. Data‑size units (bits, bytes and binary prefixes)
Bits and bytes
1 bit = a single binary digit (0 or 1).
1 byte = 8 bits.
Binary prefixes (IEC)
Prefix
Symbol
Value (bytes)
Kibibyte
KiB
1 024 B
Mebibyte
MiB
1 024 KiB = 1 048 576 B
Gibibyte
GiB
1 024 MiB = 1 073 741 824 B
Tebibyte
TiB
1 024 GiB = 1 099 511 627 776 B
Worked example – Size of a 1920 × 1080 colour image at 24‑bit depth:
Pixels = 1920 × 1080 = 2 073 600.
Bits per pixel = 24 → Bytes per pixel = 3.
Image size = 2 073 600 × 3 B = 6 220 800 B ≈ 5.93 MiB.
3. Magnetic storage
Data is stored by magnetising tiny regions (domains) on a rotating magnetic platter. The direction of the magnetic field (north‑south) represents a binary 0 or 1.
How it works
The platter is coated with a ferromagnetic material and divided into concentric tracks. Each track is split into sectors.
The write head creates a magnetic field that aligns the domains in the chosen direction, thereby writing a 0 or 1.
The read head senses the polarity of the domains as the platter spins past it and converts the changes into electrical signals.
Typical examples
Internal hard‑disk drive (HDD) – the standard primary secondary storage in most desktops and laptops.
Floppy disk (legacy) – magnetic disc with a flexible jacket.
Magnetic tape – used for large‑scale backup and archival.
Hard‑disk platter with magnetic tracks, sectors and a read/write head.
Feature
Typical value
Impact on use
Capacity
500 GB – 20 TB
Ideal for large data archives and as the main storage in PCs.
Access time (average seek)
5 – 10 ms
Slower than SSD for random reads/writes.
Durability
Sensitive to shock and magnetic fields
Handle with care; not suited for rugged mobile use.
Cost per GB
≈ $0.03 – $0.05
Economical for bulk storage.
4. Optical storage
Data is encoded as microscopic pits (low) and lands (high) on a reflective disc surface. A laser reads the disc by detecting changes in reflected light intensity.
How it works
The disc surface is divided into concentric tracks, each track split into sectors.
Laser‑write: a high‑precision laser heats a tiny spot; the material either melts to form a pit (binary 0) or remains a land (binary 1).
Laser‑read: the laser shines on the rotating disc and a photodiode measures the reflected light. A pit reflects less light than a land, producing a voltage change that is interpreted as binary data.
Typical examples
CD‑ROM / CD‑R / CD‑RW – audio/video distribution and small data backups.
DVD‑R / DVD‑RW – portable storage for larger media files.
Blu‑ray Disc (BD‑R / BD‑RE) – high‑capacity optical storage for HD video and large data sets.
Laser reads pits and lands on an optical disc; a photodiode detects the reflected light.
Suitable for media distribution and modest backups.
Access time (seek)
50 – 100 ms
Slower than magnetic and solid‑state for random access.
Durability
Resistant to magnetic fields; scratches or fingerprints can render data unreadable
Handle with care; good for archival if stored properly.
Cost per GB
≈ $0.10 – $0.30
Higher than HDD for large volumes, but cheap for one‑off distribution.
5. Solid‑state (flash) storage
Data is stored in semiconductor memory cells (usually NAND flash). Each cell contains a floating‑gate transistor that can trap electrons, representing a binary state.
How it works
Writing: electrons are forced onto (or removed from) the floating gate, changing the cell’s threshold voltage – this stores a 0 or 1.
Reading: the cell’s threshold voltage is measured; a high voltage indicates one state, a low voltage the other.
Erasing: cells are grouped into blocks**; an entire block must be erased before any cell in that block can be rewritten.
Wear‑leveling: algorithms distribute write/erase cycles evenly across the memory to extend lifespan.
Typical examples
Internal solid‑state drive (SSD) – primary storage in modern PCs, laptops and servers.
USB flash drive – portable device for data transfer.
Memory cards (SD, micro‑SD) – used in cameras, smartphones and tablets.
Floating‑gate transistor in a NAND flash memory cell.
Feature
Typical value
Impact on use
Capacity
128 GB – 8 TB
Fits both consumer and enterprise workloads.
Access time (random read)
≈ 0.1 ms
Extremely fast; improves system responsiveness.
Durability
Shock‑resistant, no moving parts
Ideal for mobile devices and laptops.
Write‑cycle limit
~10 000 – 100 000 cycles per block
Managed by wear‑leveling; affects long‑term lifespan.
Cost per GB
≈ $0.10 – $0.25
Higher than HDD but falling rapidly.
6. Data compression
Compression reduces the amount of storage required for a file by removing redundancy. Two main types are used in everyday computing.
Lossless compression
Original data can be perfectly reconstructed.
Common algorithms: ZIP, PNG, RLE (run‑length encoding).
Best for text, spreadsheets, programmes and any data where loss of information is unacceptable.
Lossy compression
Some original information is permanently discarded to achieve higher reduction.
Common algorithms: JPEG (images), MP3/AAC (audio), H.264/HEVC (video).
Used where a slight loss of quality is tolerable in exchange for much smaller file sizes.
Aspect
Lossless
Lossy
Typical reduction
2 – 3 ×
10 – 100 × (or more)
Data integrity
Exact original recovered
Some data permanently lost
Common uses
Documents, source code, archival images
Photos, music, streaming video
Examples of formats
ZIP, PNG, FLAC
JPEG, MP3, H.264
7. Comparison of magnetic, optical and solid‑state storage
Aspect
Magnetic
Optical
Solid‑state
Speed (random access)
5 – 10 ms (seek)
50 – 100 ms (seek)
≈ 0.1 ms
Typical capacity
500 GB – 20 TB
700 MB – 25 GB
128 GB – 8 TB
Durability
Shock‑sensitive; magnetic‑field sensitive
Scratch‑sensitive; magnetic‑immune
Shock‑resistant; no moving parts; limited write cycles
Cost per GB
Low
Medium‑high
Higher (but falling)
Typical uses
Primary secondary storage in PCs/servers, large backups, tape archives
Media distribution, occasional backups, archival copies