Text, images and sound as numbers

About this lesson: Text, images and sound as numbers

In short

A character set gives every letter, digit and symbol a number code. In ASCII, A is 65 and a is 97. Slide through the codes and find how capitals and small letters are linked.

Text, images and sound as numbers

What you'll explore

Text: Every character is a number
A character set gives every letter, digit and symbol a number code. In ASCII, A is 65 and a is 97.
Words: Text is a list of codes
A word is stored as one code per character, including spaces and punctuation. In ASCII each character uses one byte.
Images: Pixels and colour depth
A bitmap image is a grid of pixels. Each pixel stores a binary code for its colour. The number of bits per pixel is the colour depth.
Resolution: More pixels, more detail
Resolution is how many pixels make up the image. More pixels give smoother curves but a bigger file. Slide from a blocky 4 × 4 sun to a smooth one.
Sound: Measuring a wave
Sound is a smooth wave.
Check yourself: Colour depth
An image uses a colour depth of 4 bits per pixel.

Also in this lesson

  • Step by step
  • Watch out for these
  • Explaining effects on quality and size
  • Character sets compared
  • More than the lesson
  • Stretch your brain
  • Media detective

Words to know

character set
A list of characters with a binary code for each.
ASCII
A 7-bit character set with 128 characters.
Unicode
A large character set covering every language and emoji.
pixel
The smallest dot of colour in an image.
bitmap
An image stored as a grid of pixels.
resolution
The number of pixels in an image (width × height).
colour depth
The number of bits used for each pixel.
sampling
Measuring a sound wave at regular intervals.
sample rate
How many samples are taken each second, in hertz.
sample resolution
The number of bits used for each sample.
metadata
Data about data, such as an image's size and date.

Sources

  • The Unicode Consortium: Unicode 16.0 character counts
  • BBC Bitesize, GCSE Computer Science: Representing images and sound
  • W3Techs: usage of character encodings on websites
  • Python documentation: ord() and chr()

An interactive lesson with a live experiment: move the sliders, press the buttons and answer quick questions. 6 short steps and a 8-question quiz. Part of the Family plan. Written and checked by Shalo Lab. Last updated 10 November 2026.

← Selection: if, elif and else · File size and compression →

All lessons in Term 1 · Computing · Age 14