Text, Sound & Images
Revise Text, Sound & Images for Computer Science 0478 (O Level) — revision notes and instant AI marking. Free to start.
Text, Sound & Images
Big idea: Computers can only store 1s and 0s — so every letter, sound, and picture has to be squeezed into binary using an agreed-upon "code", and the more detail you want to capture, the more bits (and storage space) that code needs.
Summary — What's in this Chapter
- Character sets (ASCII & UNICODE) give every character on your keyboard a unique binary code.
- ASCII uses 7 bits (128 characters) — good enough for English, useless for most other languages.
- Extended ASCII uses 8 bits (256 characters) — adds a few extra symbols.
- UNICODE uses a minimum of 16 bits (65,536+ characters) — covers every language and emoji on Earth.
- Sound is analogue in real life, but computers need it digital — this conversion is called Analogue to Digital conversion (A2D).
- Sample rate (Hz) = how often the sound wave is measured per second.
- Sample resolution (bits) = how much detail is stored per measurement.
- Bitmap images are grids of pixels, each pixel holding a binary colour code.
- Resolution = total number of pixels (width × height). Colour depth = bits per pixel.
- Across the whole chapter, one rule keeps repeating: more detail = more bits = bigger file.
1. Character Sets
What is a character set — and why do we even need one?
Deep down, a computer has no idea what a "letter" is. All it can store is binary —
strings of 1s and 0s. So if you want to store the letter A, everyone
(every keyboard, every screen, every app) needs to on which binary
pattern means "A". That agreed-upon list of characters and their binary codes is
called a character set.
Think of it like Morse code. Dot-dot-dot only means "S" because everyone using Morse code agreed on that mapping beforehand. If your computer used one mapping and mine used a different one, the moment you sent me a text file it would come out as gibberish — that's exactly the problem the chapter's PDF points out: without a shared standard.
Character sets are also ordered logically — the code for 'B' is exactly one more than the code for 'A', 'C' is one more than 'B', and so on. This is genuinely useful: it means a computer can sort text alphabetically just by comparing the binary numbers, and it can figure out that lowercase and uppercase letters are related by a simple fixed offset.
The number of characters a set can represent depends entirely on how many bits it uses per character. This is just the maths of binary: with bits you can make 2n different patterns, so 2n different characters.
ASCII — the original standard
ASCII (American Standard Code for Information Interchange) was one of the earliest accepted standards for representing text. It uses 7 bits per character, which gives:
Those 128 codes cover uppercase A–Z, lowercase a–z, digits 0–9, punctuation
(!, @, #...) and some control characters
(like "new line" or "tab"). That's genuinely enough for basic English — but nothing
else. No accents (é, ñ), no non-Latin alphabets (Arabic, Mandarin, Cyrillic), and
obviously no emoji.
Notice something neat in the table from the notes above: a is 97 and
A is 65 — a fixed gap of 32 between every uppercase/lowercase pair. This
is a direct result of ASCII being "ordered logically" — it's not a coincidence, it's
baked into the design.
- Cannot represent characters from languages other than English (no é, 中, ع, etc.)
- Doesn't include modern emojis or many symbols used in everyday digital communication
- Even Extended ASCII, at 256 characters, is far too small for global use
UNICODE — the modern global standard
UNICODE was created specifically to fix ASCII's biggest weakness: not enough room for the world's languages. It uses a minimum of 16 bits per character:
With 65,536+ codes available, UNICODE can represent virtually every alphabet on Earth — Latin, Cyrillic, Arabic, Chinese, Japanese, Korean, and more — plus modern symbols like emojis. This is why, when you send an emoji in a text message today, it displays correctly no matter what device or country the other person is in.
| ASCII | UNICODE | |
|---|---|---|
| Number of bits | 7 bits | 16 bits (minimum) |
| Number of characters | 128 characters | 65,536 characters |
| Uses | Represents characters in the English language | Represents characters across the world |
| Benefits | Uses a lot less storage space than UNICODE | Represents more characters; supports all common world languages; supports emojis |
| Drawbacks | Only 128 characters; cannot store emojis | Uses a lot more storage space than ASCII |
2. Representing Sound
How sound is sampled and stored
Sound in the real world — someone's voice, a guitar string — is an analogue wave: a smooth, continuous signal that can take literally any value at any point in time. Computers, on the other hand, can only store discrete binary numbers. So there's a mismatch: how do you turn a smooth, continuous wave into a series of binary numbers?
The answer is a process called Analogue to Digital conversion (A2D). The idea is simple: instead of trying to capture the continuous wave (which is impossible), the computer takes lots of individual snapshots of it. At regular, tiny intervals of time, it measures the amplitude (height) of the wave at that exact instant. Each of these individual measurements is called a sample. Each sample produces one number, and that number can be stored in binary.
String enough of these samples together in order, and you get a "staircase" version of the original wave — not perfectly smooth, but close enough that when played back (reversing the process — Digital to Analogue conversion) it sounds like the original.
There are two separate "dials" you can turn to control how accurately that staircase matches the original wave: sample rate and sample resolution.
Sample Rate
Sample rate is simply of the analogue wave. It's measured in Hertz (Hz), where 1 Hertz = 1 sample taken per second.
Real-world examples help this stick. Old analogue telephone lines sampled sound at only around 16/22 kHz — which is why hold music over the phone always sounds thin and tinny. A standard music CD samples at 44.1 kHz (44,100 samples every second!) — enough to make music sound rich and full. A DVD pushes it even further to 48 kHz.
| Device | Typical Sample Rate |
|---|---|
| Telephone | 16 / 22 kHz |
| Music CD | 44.1 kHz |
| DVD | 48 kHz |
Sample Resolution
Sample resolution is the . If sample rate is about you measure, sample resolution is about you measure each time.
Imagine measuring someone's height with a ruler that only has marks every 10 cm, versus one with marks every 1 mm. Both rulers can measure height, but the second one captures far more detail. That's exactly the difference between low and high sample resolution — an 8-bit sample can only represent 256 different amplitude "heights", while a 16-bit sample can represent 65,536 different heights, capturing much finer detail in the loudness of the sound at that instant.
The effect of sample rate and resolution
Both sample rate and sample resolution follow the exact same overall pattern — turning either one up improves playback quality, but always at the cost of a bigger file.
| Sample Rate | Sample Resolution | |||
|---|---|---|---|---|
| High | Low | High | Low | |
| Playback quality | ↑ Higher | ↓ Lower | ↑ Higher | ↓ Lower |
| File size | ↑ Bigger | ↓ Smaller | ↑ Bigger | ↓ Smaller |
3. Representing Images
Bitmap Images & Pixels
A bitmap image (like a photograph) is built out of a grid of tiny squares called pixels — short for "picture elements." A pixel is the smallest possible element of a bitmap image; you can't split one pixel into anything smaller.
Every single pixel in the image is stored as its own binary code, and that binary code is unique to whatever colour that particular pixel is. So a photo isn't stored as "a picture of a cat" — under the hood, it's just a huge, ordered list of binary numbers, one per pixel, each one saying "this exact tiny square is this exact colour."
Naturally: the more colours involved and the more fine detail in the picture, the higher the quality — but also the more binary data that has to be stored. That's the exact same trade-off we saw with sound, just applied to pictures instead.
Resolution — how many pixels
Resolution is the total number of pixels that make up a bitmap image. You calculate it by multiplying the image's width × height in pixels.
In general, higher resolution means more detail and better image quality — more tiny squares means each one can be smaller and more precise, so curves and edges look smoother instead of blocky.
You'll often see display resolution described just by the vertical pixel count:
| Context | Examples |
|---|---|
| Computer monitors | 1440p = 2560×1440 (1440 pixels vertically). 4K = 3840×2160 (2160 pixels vertically) |
| TVs | HD = 1080p (1080 pixels vertically). UHD/4K = 2160p (2160 pixels vertically, i.e. 3840×2160) |
| YouTube | Quality selector runs from 144p (144 pixels vertically) up to 4K (2160p) |
Colour Depth — how many colours per pixel
Colour depth is the number of bits stored per pixel in a bitmap image. It works exactly like the character-set maths from the start of this chapter: with bits, you get 2n possible colours.
With a colour depth of just 1 bit, you only get 21 = 2 possible values — enough for pure black & white (1 = white, 0 = black), like the pixel-art character shown in the original notes.
With a colour depth of 2 bits, you get 22 = 4 possible binary codes (00, 01, 10, 11) — so 4 colours available.
| Colour Depth | Amount of Colours (2n) |
|---|---|
| 1 bit | 2 (black & white) |
| 2 bit | 4 |
| 4 bit | 16 |
| 8 bit | 256 |
| 24 bit | 16,777,216 ("True Colour") |
This is why 24-bit colour is nicknamed "True Colour" — with over 16 million possible shades available per pixel, the human eye essentially cannot tell the difference between neighbouring shades, so it looks like a smooth, infinite range of colour.
The impact of resolution & colour depth on file size
As either resolution or colour depth increases, the bigger the file becomes on secondary storage. This makes sense once you break it down:
- Higher resolution → more pixels in the image → more individual binary codes need storing
- Higher colour depth → more bits stored per pixel → each of those codes is longer
Because higher resolution and higher colour depth both push the file size up, there's always a balancing act between image quality and how much storage space (or bandwidth, if streaming) you're willing to spend.
What to Memorise
Concepts Checklist
Exam Tips
- Precise numbers (7 bits, 128 characters, 44.1 kHz, etc.) rather than vague statements
- Use of the correct formulas: 2n for characters/colours; width × height for resolution; width × height × colour depth for file size
- Clear cause-and-effect language: "more bits → more detail → bigger file size," not just "it's better"
- Real-world context questions (e.g. "why does old telephone hold music sound bad?") expecting you to link sample rate to audible quality
- Why do we need character sets at all?
- Why can't ASCII be used for a multilingual app?
- What's the difference between sample rate and sample resolution?
- What's the formula for the file size of a bitmap image?
- Why does 4K get its name from the horizontal, not vertical, resolution?
- Bitmap Images & Pixels
- The impact of resolution & colour depth on file size
Read the full Text, Sound & Images notes free
That's the preview — create a free account to read the rest, plus flashcards and practice questions with instant AI marking. No credit card.
Unlock the full notes free →