Primary storage (also called main memory) is the part of a computer that holds data and instructions which the CPU must access rapidly while a program is running. It is directly addressable by the processor, is much faster than secondary storage, and is usually volatile.
2. Key Characteristics of Primary Storage
Volatility: Most primary memory (e.g., registers, cache, RAM) loses its contents when power is removed.
Speed: Access times are measured in nanoseconds (ns) – orders of magnitude faster than secondary storage.
Direct addressability: Every byte has a unique memory address that the CPU can use without any intermediate steps.
Limited capacity: From a few bytes in micro‑controllers to several gigabytes (GB) in modern PCs.
3. Types of Primary Storage
Registers – tiny, ultra‑fast storage inside the CPU for operands and intermediate results.
Cache memory – small, fast memory (L1, L2, L3) that holds copies of frequently used RAM data.
Random‑Access Memory (RAM) – the main workspace for programs and data while they run.
Read‑Only Memory (ROM) and its variants
ROM – permanently programmed during manufacture; non‑volatile.
PROM (Programmable ROM) – can be programmed once after manufacture.
EPROM (Erasable‑Programmable ROM) – can be erased with UV light and re‑programmed.
EEPROM (Electrically‑Erasable‑Programmable ROM) – can be erased and re‑programmed electrically.
Flash memory – a type of EEPROM used for BIOS/UEFI and solid‑state drives.
4. Memory Hierarchy (Fastest → Slowest)
Typical memory hierarchy – the higher the level, the faster and more expensive per byte.
5. Addressing in Primary Memory
Primary memory is byte‑addressable: each individual byte has its own address. If a system has n address lines, the total number of addressable locations is:
Number of locations = 2n
Example 1 – 32‑bit address bus: 232 = 4 294 967 296 bytes ≈ 4 GB of RAM.
Example 2 – 24‑bit address bus (exam style): 224 = 16 777 216 bytes = 16 MiB of RAM.
6. Volatile vs Non‑volatile Primary Storage
Memory type
Volatile?
Typical use
Registers, Cache, RAM
Yes – data is lost when power is removed
Temporary storage of data being processed
ROM, PROM, EPROM, EEPROM, Flash
No – retains data without power
Firmware, BIOS/UEFI, permanent system code
7. Units of Storage (Binary Prefixes)
The IGCSE syllabus uses the binary (base‑2) definitions. All conversions are performed by repeatedly dividing or multiplying by 1 024.
Virtual memory uses a reserved area of secondary storage (called swap space or page file) as an extension of RAM.
Memory is divided into fixed‑size blocks called pages (commonly 4 KB). When RAM becomes full, pages that are not currently needed are written to the swap space; needed pages are read back into RAM.
This paging process allows a computer to run programs that require more memory than the physical RAM provides, at the cost of slower access (disk speed vs RAM speed).
Key points for the exam:
Virtual memory = RAM + part of secondary storage.
Pages are moved between RAM and swap space (paging).
Purpose: prevent “out‑of‑memory” crashes and enable larger programs.
10. File‑Size Calculations (Exam‑style Examples)
Example A – Colour Image
Calculate the size of a 640 × 480 pixel colour image that uses 24‑bit colour (8 bits for each of red, green, blue).
Number of pixels = 640 × 480 = 307 200.
Bits per pixel = 24 bits.
Total bits = 307 200 × 24 = 7 372 800 bits.
Convert to bytes: 7 372 800 ÷ 8 = 921 600 bytes.
Convert to KiB: 921 600 ÷ 1 024 ≈ 900 KiB.
Convert to MiB: 900 ÷ 1 024 ≈ 0.88 MiB.
Uncompressed size ≈ 0.88 MiB (≈ 900 KiB).
Example B – Mono Audio Clip
Calculate the size of a 30‑second mono audio recording sampled at 44.1 kHz with 16‑bit resolution.
Compression reduces the amount of storage required for a file.
Lossless compression – original data can be perfectly reconstructed (e.g., PNG, ZIP). Used where every bit matters, such as text, spreadsheets, or executable files.
Lossy compression – some data is permanently discarded to achieve higher compression ratios (e.g., JPEG for photos, MP3 for audio). Acceptable when a small loss of quality is not noticeable.
Exam‑style Question – Compression
Question: Identify whether each of the following file types uses lossless or lossy compression.
JPEG image
PNG image
MP3 audio
ZIP archive
Answer:
JPEG – lossy
PNG – lossless
MP3 – lossy
ZIP – lossless
12. Linking to IGCSE Assessment Objectives
Sub‑topic
AO1 – Knowledge
AO2 – Application
AO3 – Evaluation (where relevant)
Definition & characteristics of primary storage
Recall definition, volatility, speed, direct addressability, capacity limits.
Explain why primary storage must be fast and volatile.
Discuss trade‑offs between speed and cost.
Types of primary storage (registers, cache, RAM, ROM variants)
Name each type and its main purpose.
Identify which type would store a CPU operand vs. firmware.
Evaluate advantages of using ROM vs. RAM for system code.
Memory hierarchy
List the hierarchy in order (fastest → slowest).
Explain how the hierarchy reduces overall access time.
Assess the impact of adding an extra cache level.
Addressing & address‑bus calculations
State the formula 2ⁿ and the meaning of byte‑addressable.
Calculate maximum RAM for a given address‑bus width.
Discuss why a 64‑bit address bus is needed for modern PCs.
Volatile vs non‑volatile primary storage
Define volatility and give examples.
Choose the appropriate memory type for a given scenario.
Evaluate the consequences of power loss on volatile memory.
Binary units (KiB, MiB, GiB)
Recall the 1 024‑based definitions.
Convert between bytes, KiB, MiB, GiB.
Explain why the exam uses binary prefixes instead of decimal.
Virtual memory
Describe paging, swap space, and why it is needed.
Illustrate how a page is moved from RAM to secondary storage.
Evaluate the performance impact of excessive paging (thrashing).
File‑size calculations
Recall the steps for converting pixels or samples to bytes.
Perform calculations for image and audio file sizes.
Assess how compression would change the calculated size.
Data compression
Define lossless and lossy compression.
Identify which method a given file type uses.
Discuss when lossless vs. lossy compression is appropriate.
13. Key Take‑aways
Primary storage is fast, directly addressable memory used while programs run.
The memory hierarchy (registers → cache → RAM → ROM) balances speed, cost, and capacity.
Address‑bus width determines the maximum addressable memory (2ⁿ locations).
Binary prefixes (KiB, MiB, GiB) are essential for capacity and file‑size calculations.
Virtual memory links primary and secondary storage through paging and swap space.
Compression (lossless vs. lossy) lets large files be stored more efficiently; know the typical examples.
All sub‑topics map directly to IGCSE assessment objectives (AO1, AO2, AO3), aiding both teaching and exam preparation.