Where data lives while a program runs, where it lives when the power is off, how we measure it, how we encode numbers/text/images/sound, and how we squash files. Open any heading.
1.2.1 Primary storage
Primary storage is memory the CPU can use directly as it runs: mainly RAM, ROM, and (in the spec’s model) virtual memory. Cache was in 1.1 — still primary-ish, but questions here want RAM/ROM/virtual.
RAM
- Random Access Memory — currently running programs and the data they are using
- Volatile: contents lost when power is off
- More RAM → more programs/data in fast memory → less need to shuffle to disk
ROM
- Read-Only Memory (today often flash that acts as ROM at boot)
- Non-volatile
- Typical use: bootstrap / BIOS / firmware — the first instructions that start the machine
RAM vs ROM in one table
| RAM | ROM | |
|---|---|---|
| Volatile? | Yes | No |
| Typical contents | Running programs, working data | Boot / firmware |
| CPU write during normal use? | Constantly | Not in normal operation |
Virtual memory
When RAM is full, the OS moves inactive pages of RAM out to a reserved area of secondary storage (the page file / swap). That area is virtual memory.
- Lets you run more than physical RAM would allow
- Much slower than RAM — too much swapping is thrashing (the machine crawls)
Need: RAM is full → move idle data to disk → free RAM for what is active → if that data is needed again, page it back in.
1.2.2 Secondary storage
Non-volatile storage for files, the OS, and anything that must survive a power-off. Three technologies:
| Type | How it stores bits | Examples | Typical traits |
|---|---|---|---|
| Magnetic | Magnetised regions on spinning platters | HDD, magnetic tape | Cheap per GB, slower, moving parts, decent durability if not dropped |
| Solid state | Flash cells, no moving parts | SSD, USB stick, SD card | Fast, shock-resistant, more expensive per GB, limited write cycles (still fine for normal use) |
| Optical | Pits and lands, laser | CD, DVD, Blu-ray | Cheap removable discs, slow, easy to scratch, falling out of everyday use |
Choosing storage (the exam pattern)
Give the need, then characteristics: capacity, speed, portability, durability, reliability, cost.
Example: a photographer’s working drive in a backpack → SSD (durable, fast, portable) not a spinning HDD; archive of 20 years of RAW files → high-capacity HDD or tape (cost per GB).
1.2.3 Units
| Name | Size |
|---|---|
| Bit | 0 or 1 |
| Nibble | 4 bits |
| Byte | 8 bits |
| Kilobyte (KB) | 1,024 bytes |
| Megabyte (MB) | 1,024 KB |
| Gigabyte (GB) | 1,024 MB |
| Terabyte (TB) | 1,024 GB |
| Petabyte (PB) | 1,024 TB |
OCR GCSE uses 1,024 (binary prefixes) unless the question says otherwise. Show every conversion step. No calculator in the exam.
A file size question is usually: how many bits in total, then divide down to the asked unit.
1.2.4 Data storage
Four encodings. This is the fattest spec point on Paper 1 — sit with it.
Numbers — binary, denary, hex
Denary is base 10 (what you count in). Binary is base 2. Place values for 8-bit:
128 64 32 16 8 4 2 1
Example: 01001101
64+8+4+1 = 77 denary.
Hexadecimal is base 16: digits 0–9 then A–F (10–15). One hex digit = one nibble (4 bits). Two hex digits = one byte.
0100 1101 → 4D hex.
Why hex? Shorter for humans than binary; easy to convert (groups of 4 bits); used for colours, memory addresses, MAC addresses.
Binary addition and overflow
Add bit by bit, right to left, like denary, carrying when 1+1=10.
If the result does not fit in the bits you have, that is overflow — the extra 1 has nowhere to live. In 8-bit unsigned, 255+1 overflows.
Binary shifts
- Left shift of 1 place ≈ multiply by 2 (if no bits fall off)
- Right shift of 1 place ≈ divide by 2, lose the remainder (integer)
Shifts are fast. Bits that fall off the end are gone.
Characters
- ASCII: 7-bit original (0–127). Enough for English letters, digits, punctuation
- Extended ASCII: 8-bit (0–255)
- Each character is a code —
'A'is 65,'a'is 97. The difference is 32 — useful for case tricks - Unicode covers many languages and symbols; common encodings include UTF-8. Needs more bits per character for many symbols
Images
A bitmap is a grid of pixels.
- Colour depth (bits per pixel): 1-bit = two colours (mono); 8-bit = 256 colours; 24-bit = ~16.7 million (8 bits each for R, G, B)
- Resolution: width × height in pixels
- File size (bits) ≈ width × height × colour depth (uncompressed). Then convert to bytes / KB / MB
- Metadata: extra data about the image — height, width, colour depth, GPS, camera settings — not the pixels themselves
Sound
Analogue sound is sampled:
- Sample rate: samples per second (Hz). CDs use 44,100 Hz
- Bit depth (sample resolution): bits per sample. More bits → more accurate amplitude
- Duration in seconds
- Channels: 1 = mono, 2 = stereo
File size (bits) ≈ sample rate × bit depth × duration × channels (uncompressed).
Higher sample rate / bit depth → better quality, larger file.
1.2.5 Compression
Why compress? Smaller files → less storage, faster transmission, cheaper bandwidth.
| Lossy | Lossless | |
|---|---|---|
| Data thrown away? | Yes — cannot get the original bits back | No — reconstruct the original exactly |
| Typical uses | JPEG photos, MP3 / AAC audio, many videos | PNG, ZIP, FLAC, GIF (usually), documents you must not corrupt |
| Quality | Lower (often “good enough”) | Original |
Lossy exploits what humans barely notice (quiet frequencies, tiny colour differences). Lossless exploits patterns (repeated bytes, dictionaries).
Do not ZIP a JPEG and call it lossless-of-the-photo — the JPEG already lost data; ZIP just packs the already-lossy file.
Exercises and quiz are below. Jump into binary first if 1.2.4 is the gap.