Library Computer Science 0478 Text, Sound & Images
O Level · Computer Science 0478

Text, Sound & Images

Revise Text, Sound & Images for Computer Science 0478 (O Level) — revision notes and instant AI marking. Free to start.

📖 Revision notes · preview
Cambridge (CIE) IGCSE · Computer Science

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.

Core Rule
Number of characters possible = 2(number of bits)
In plain English: every extra bit you add doubles the number of characters you can represent.

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:

27 = 128 possible characters

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.

a = 097 = 01100001 A = 065 = 01000001 b = 098 = 01100010 B = 066 = 01000010 c = 099 = 01100011 C = 067 = 01000011 ...notice: lowercase 'a' is exactly 32 more than uppercase 'A' (097 - 065 = 32)

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.

Extended ASCII
To patch some of ASCII's gaps, Extended ASCII uses the full 8 bits instead of 7, giving 28 = 256 characters. The extra 128 slots were used for things like mathematical operators (±, ÷) and a handful of extra symbols such as ©. It's still nowhere near enough to cover every language in the world though.
Limitations of ASCII & Extended ASCII
  • 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
Practice Question 1
Using the ASCII table (E=69, F=70, G=71, H=72), what character is represented by the denary code 76?
Practice Question 2
Explain why ASCII is unsuitable for a website that needs to display text in both English and Japanese.

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:

216 = 65,536 possible characters (minimum)

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.

ASCIIUNICODE
Number of bits7 bits16 bits (minimum)
Number of characters128 characters65,536 characters
UsesRepresents characters in the English languageRepresents characters across the world
BenefitsUses a lot less storage space than UNICODERepresents more characters; supports all common world languages; supports emojis
DrawbacksOnly 128 characters; cannot store emojisUses a lot more storage space than ASCII
Examiner Tip (from the original notes)
Exam questions often ask you to compare ASCII & UNICODE — number of bits, number of characters, and what each can store. Learn that comparison table above cold; it's one of the most frequently tested tables in this whole chapter.
Practice Question 3
A company wants to switch their entire database from ASCII to UNICODE. State one advantage and one disadvantage of doing this.

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.

Original analogue wave: /\_/\_ (smooth, continuous curve) Sampled (digital) version: ▁▂▄▆█▆▄▂▁▂▄▆ (a "staircase" made of discrete samples) The MORE samples you take (and the more bits per sample), the closer the staircase looks to the original smooth curve.

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.

Key Idea
Higher sample rate → more snapshots per second → digital wave looks closer to the original

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.

DeviceTypical Sample Rate
Telephone16 / 22 kHz
Music CD44.1 kHz
DVD48 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.

Connecting the dots
Sample resolution for sound is conceptually the exact same idea as colour depth for images (coming up next) — both measure "how many bits are used to describe one single measurement point," just applied to different kinds of data.

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 RateSample Resolution
HighLowHighLow
Playback quality↑ Higher↓ Lower↑ Higher↓ Lower
File size↑ Bigger↓ Smaller↑ Bigger↓ Smaller
The Trade-off You'll See Everywhere in this Chapter
More detail captured = better quality = bigger file size
Practice Question 4
Explain why sound recorded over an old analogue telephone line sounds worse than the same sound on a music CD.
Practice Question 5
A sound engineer increases both the sample rate and sample resolution of a recording. State two effects this will have.

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.

Formula
Resolution (total pixels) = width (in pixels) × 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:

ContextExamples
Computer monitors1440p = 2560×1440 (1440 pixels vertically). 4K = 3840×2160 (2160 pixels vertically)
TVsHD = 1080p (1080 pixels vertically). UHD/4K = 2160p (2160 pixels vertically, i.e. 3840×2160)
YouTubeQuality selector runs from 144p (144 pixels vertically) up to 4K (2160p)
Where does the name "4K" come from?
It's not from the vertical count at all — it comes from the horizontal resolution of roughly 4,000 pixels (3840 pixels wide, rounded up).

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.

Formula
Number of available colours = 2(colour depth in bits)

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 DepthAmount of Colours (2n)
1 bit2 (black & white)
2 bit4
4 bit16
8 bit256
24 bit16,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
The Master Formula for Bitmap File Size
File size (in bits) = width × height × colour depth
i.e. Resolution × Colour Depth. This one formula ties the whole images topic together — memorise it.

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.

Examiner Tip (from the original notes)
In casual conversation people say "higher resolution = better quality" — but in the exam, be precise: Avoid vague words like "better"; instead give the technical impact, e.g.
Practice Question 6
Define the term "pixel."
Practice Question 7
If an image has a colour depth of 2 bits, how many colours can the image represent?
Practice Question 8
Describe the impact of changing an image's resolution from 500×500 to 1000×1000.

What to Memorise

Character Set
All characters/symbols a system can represent, each with a unique binary code.
ASCII
7 bits, 128 characters. Only covers basic English.
Extended ASCII
8 bits, 256 characters. Adds symbols like ± and ©.
UNICODE
Minimum 16 bits, 65,536+ characters. Covers all world languages & emojis.
Formula: characters
Number of characters = 2(bits)
A2D Conversion
Analogue to Digital conversion — turning a continuous sound wave into stored binary samples.
Sample
One single measurement of a sound wave's amplitude at a point in time.
Sample Rate
Samples taken per second, measured in Hertz (Hz).
Sample Resolution
Number of bits stored per sample of sound.
Pixel
The smallest element of a bitmap image.
Resolution (image)
Total pixels = width × height.
Colour Depth
Bits stored per pixel. Colours = 2(bits).
Formula: bitmap file size
File size = width × height × colour depth
The universal rule
More detail captured (bits) = better quality = bigger file size. True for text, sound, and images.

Concepts Checklist

Exam Tips

⚠ Common Mistake #1
Mixing up ASCII and UNICODE bit counts. Remember: ASCII = 7 bits (128 chars), Extended ASCII = 8 bits (256 chars), UNICODE = 16 bits minimum (65,536+ chars). Examiners love asking you to state these numbers precisely — a vague "ASCII uses fewer bits" won't get full marks; you need the exact figures.
⚠ Common Mistake #2
Saying "higher resolution = better quality" without technical detail. Examiners want the precise definition: — and then the mechanism: more pixels means finer detail can be captured, hence higher quality, but also a larger file size.
⚠ Common Mistake #3
Confusing sample rate with sample resolution. Sample rate = how often you measure (Hz, samples per second). Sample resolution = how much detail each measurement has (bits per sample). Students often swap these definitions under exam pressure — practise saying both out loud until they're automatic.
✓ What Examiners Look For
  • 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
✓ Quick Self-Test
Before your exam, try answering these from memory without looking back at the notes:
  • 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?
If you can answer all five confidently, you've genuinely got this chapter down.
🔓 Read the full Text, Sound & Images note — free You're seeing the preview · free account, no card needed
Also in the full note
  • Bitmap Images & Pixels
  • The impact of resolution & colour depth on file size
What's inside
📖 Revision notes 🎯 Learn mode ✦ AI flashcards ✓ Instant AI marking 🧊 3D explorers 🧪 Experiments & simulations 📈 Progress tracking
📄 Practise Text, Sound & Images with Computer Science 0478 past papers Every paper with its mark scheme — answer online, marked instantly. Open →

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 →

More Computer Science topics