Skip to content

Representing text, images and sound: GCSE Computer Science revision notes

A character set gives each character a binary code. ASCII uses 7 bits, giving 128 characters (extended ASCII uses 8 bits for 256). Unicode uses up to 32 bits, so it can represent characters from every language, and emoji.

In short

A character set gives each character a binary code. ASCII uses 7 bits, giving 128 characters (extended ASCII uses 8 bits for 256). Unicode uses up to 32 bits, so it can represent characters from every language, and emoji.

For GCSE students in Years 10 and 11, on the AQA, OCR, Edexcel, Eduqas, Edexcel IGCSE and Cambridge IGCSE Computer Science courses.

Characters

  • A character set gives each character a binary code. ASCII uses 7 bits, giving 128 characters (extended ASCII uses 8 bits for 256). Unicode uses up to 32 bits, so it can represent characters from every language, and emoji.
  • The codes are in order: if 'A' is 65, then 'C' is 67. The lower-case letters come later ('a' is 97).

Images

  • A bitmap image is made of pixels. Each pixel's colour is stored as a binary code.
  • Colour depth is the number of bits per pixel. n bits give 2ⁿ colours: 1 bit gives 2 colours, and 8 bits give 256.
  • Resolution is the number of pixels in the image (width × height). More pixels or a greater colour depth give better quality, but a bigger file.
  • File size in bits = width × height × colour depth. A 100 × 50 image with 8-bit colour is 100 × 50 × 8 = 40 000 bits = 5000 bytes. The file also stores metadata, such as the width, height and colour depth.

Sound

  • Sound is sampled: the amplitude of the sound wave is measured at regular intervals and each measurement is stored in binary.
  • The sample rate is the number of samples per second, in hertz (Hz). The bit depth (sample resolution) is the number of bits per sample.
  • File size in bits = sample rate × bit depth × length in seconds. 10 seconds at 44 100 Hz and 16 bits is 7 056 000 bits = 882 000 bytes.
  • A higher sample rate or bit depth makes the recording closer to the original sound, but the file is bigger.

Key terms

Character set
A list of characters and the binary code that represents each one.
ASCII
A character set that uses 7 bits to represent 128 characters.
Unicode
A character set that uses more bits, so it can represent characters from every language.
Pixel
A single dot of colour in a bitmap image.
Colour depth
The number of bits used to store the colour of each pixel.
Resolution
The number of pixels in an image.
Metadata
Data about a file, such as an image's width, height and colour depth.
Sample rate
The number of sound samples taken per second.
Bit depth
The number of bits used to store each sound sample.

Quick questions on Representing text, images and sound

How many characters can 7-bit ASCII represent?
128: 2⁷ = 128.
Why was Unicode introduced?
To represent characters from all the world's languages: ASCII only has room for English letters and symbols.
In ASCII, 'A' is 65. What is 'D'?
68: The letters are in order: A 65, B 66, C 67, D 68.
What is a pixel?
A single dot of colour in a bitmap image: Images are made of thousands of pixels.
How many colours can a colour depth of 4 bits show?
16: 2⁴ = 16.
What is colour depth?
The number of bits used for each pixel: More bits means more possible colours.
What is the file size of a 100 × 50 pixel image with a colour depth of 8 bits?
5000 bytes: 100 × 50 × 8 = 40 000 bits, and 40 000 ÷ 8 = 5000 bytes.
What happens when the resolution of an image is increased?
It has more pixels, so more detail and a bigger file: Resolution is the number of pixels.
What is metadata in an image file?
Data about the image, such as its width, height and colour depth: It tells the computer how to display the image.
What is sampling?
Measuring the amplitude of a sound wave at regular intervals: Each measurement is stored as a binary number.
What is the sample rate?
The number of samples taken per second: It is measured in hertz (Hz).
What happens when you increase the bit depth of a sound recording?
The quality improves and the file gets bigger: Each sample is stored more precisely.
What is the size of a 10-second mono recording at 44 100 Hz and 16 bits?
882 000 bytes: 44 100 × 16 × 10 = 7 056 000 bits, and ÷ 8 gives bytes.

Representing text, images and sound: exam-style questions and mark schemes

  1. How many different colours can be shown with a colour depth of 3 bits? [1 mark]

    Answer: 8

  2. An image is 200 pixels wide and 100 pixels high, with a colour depth of 4 bits. Calculate its file size in bytes. Ignore the metadata. [3 marks]

    • 200 × 100 = 20 000 pixels (1)
    • 20 000 × 4 = 80 000 bits (1)
    • 80 000 ÷ 8 = 10 000 bytes (1)
  3. Explain why many modern systems use Unicode instead of ASCII. [2 marks]

    • ASCII can only represent 128 characters (or 256 in extended ASCII) (1)
    • Unicode uses more bits, so it can represent characters from all languages, and emoji (1)
  4. Explain how increasing the sample rate affects a sound recording. [3 marks]

    • More samples are taken every second (1)
    • So the recording is closer to the original sound: better quality (1)
    • But the file size increases (1)
  5. Explain how sound is recorded and stored as digital data, and how the sample rate and bit depth affect the quality and size of the file. [6 marks]

    • a microphone turns sound into an analogue signal, which is converted to digital (by an ADC)
    • the amplitude of the sound wave is measured at regular intervals (samples)
    • each sample is stored as a binary number
    • the sample rate is the number of samples taken each second (in hertz)
    • a higher sample rate makes the recording closer to the original sound
    • the bit depth is the number of bits used for each sample
    • a higher bit depth stores each amplitude more precisely
    • both make the file bigger: size = sample rate × bit depth × length in seconds

How to answer them: exam technique and command words.

Representing text, images and sound: questions and answers

What is metadata in an image file?
Data about the image, such as its width, height and colour depth. It tells the computer how to display the image.
What is sampling?
Measuring the amplitude of a sound wave at regular intervals. Each measurement is stored as a binary number.
What is the sample rate?
The number of samples taken per second. It is measured in hertz (Hz).

Practise Representing text, images and sound: 13 questions

Download these notes as a PDF

Previous topic: Binary addition and shiftsNext topic: Data compression

More in Fundamentals of data representation

LycoLearn is still loading…

This can take a little longer on a busy school or home network. If nothing happens, try refreshing the page.

LycoLearn didn’t load properly

Part of it didn’t arrive. Try refreshing the page in a minute, or open LycoLearn in another browser.