EEasy IGCSELabTracker

On a phone the notes, quizzes and tracker work fine. The 3D models and the practice lab are made for a laptop.

Specification points 1.2.1–1.2.3 ·

how text, sound and images are represented in binary: ASCII and Unicode, sample rate and sample resolution, resolution and colour depth.

1Text

Text must be converted to binary to be processed. Each character is given a unique binary code from a character set.

Definition

Character set — a defined list of characters that a computer can represent, each with its own unique binary code. The computer stores and processes the codes, not the characters.

For example, in ASCII the letter A is 65 = 1000001. Letters are coded in sequence, so B is 66, C is 67; lower-case a is 97.

ASCII Unicode
Bits per character 7 bits (8 in extended ASCII) more bits — up to 32 (4 bytes)
Number of characters 128 (256 extended) far more
What it covers English letters, digits, punctuation, control codes characters from many different languages, symbols and emojis
Effect on file size smaller text files larger text files, because each character needs more bits

Unicode's first 128 codes are the same as ASCII's.

2Sound

Sound is an analogue wave. To store it, the wave is sampled: its amplitude (height) is measured at regular time intervals, and each measurement is stored as a binary number.

000 001 010 011 100 101 110 111 time amplitude one sample interval — sample rate = number of samples per second 3-bit sample resolution: 8 levels stored samples: 100 110 110 110 101 … sample
Figure 1. Sampling a sound wave: 3-bit sample resolution gives 2³ = 8 amplitude levels.

Change the sample rate and resolution

Loading the interactive…

Definition

Sample rate — the number of samples taken in a second (measured in hertz, Hz).

Sample resolution — the number of bits per sample.

  • Higher sample rate → samples are closer together in time, so changes in the wave are captured more often.
  • Higher sample resolution → more amplitude levels (n bits give 2ⁿ levels), so each sample is measured more precisely.

In both cases the accuracy of the recording increases (closer to the original sound) and the file size increases (more bits are stored).

3Images

A bitmap image is a grid of pixels (picture elements). The colour of each pixel is stored as a binary code, and the image is stored as the codes for all its pixels.

6 × 6 = 36 pixels colour depth 2 bits → 2² = 4 colours 00 01 10 11 top row stored as: 00 00 11 11 00 00 whole image: 36 pixels × 2 bits = 72 bits
Figure 2. A bitmap image: resolution 6 × 6 = 36 pixels, colour depth 2 bits (4 colours).

Paint a bitmap and read its bits

Loading the interactive…

Definition

Resolution — the number of pixels in the image (width × height).

Colour depth — the number of bits used to represent each colour (each pixel's colour).

  • Higher resolution → more pixels, so more detail (less blocky, or "pixelated").
  • Higher colour depth → more possible colours (n bits give 2ⁿ colours: 1 bit = 2, 8 bits = 256, 24 bits ≈ 16.7 million), so colours are more realistic.

As resolution and colour depth increase, the quality of the image and the file size both increase.

Traps
Wrong Right
Sample rate is the number of bits per sample Sample rate = samples per second; sample resolution = bits per sample
Colour depth is the number of colours Colour depth is the number of bits per pixel; the number of colours is 2^(colour depth)
Resolution is the size of the screen Resolution is the number of pixels in the image

Quick check

10 multiple-choice questions. Pick an answer to see whether it is right and why.

  1. The ASCII code for A is 65. What is the 7-bit binary code for B?

  2. How many characters can 7-bit ASCII represent?

  3. Which of these can Unicode represent but ASCII cannot?

  4. Why is a text file saved in Unicode larger than the same text saved in ASCII?

  5. What is measured at regular time intervals when a sound wave is sampled?

  6. What is the sample rate of a sound recording?

  7. A sound is recorded with a sample resolution of 5 bits. How many amplitude levels can be stored?

  8. What happens when the sample rate of a recording is increased?

  9. An image uses 16 different colours. What is the smallest colour depth it needs?

  10. The resolution of an image is reduced and its colour depth is kept the same. What is the effect?

Exam-style questions

Write your answer, then show the answer and compare. Nothing here is marked for you: you decide how close you were. What you write is saved in this browser.

Recall

1

What is a character set?

2

Define sample rate and sample resolution.

3

Define resolution and colour depth for an image.

Understanding

4

Give two differences between ASCII and Unicode.

5

A sound is recorded with a 4-bit sample resolution. How many different amplitude values can be stored?

6

How many colours can be represented with a colour depth of 8 bits?

7

The ASCII code for C is 67. Give the code for G in denary and in 7-bit binary.

Application

8

A company's website is published in English, Arabic and Japanese. Explain why it uses Unicode rather than ASCII.

9

A photographer changes the colour depth of an image from 8 bits to 16 bits. Describe the effect on the image and on its file size.

10

A music app lowers the sample rate of a song to save space. Explain the effect on the recording.

Exam-style

11

Describe how a computer represents a sound as binary.

4 marks
12

Explain how a computer represents an image, including the effect of increasing its resolution.

3 marks

How well do you know this?

Rate each specification point. It is saved to your tracker as a new revision round.

All points:
  • 1.2.1Understand how and why a computer represents text and the use of character sets, including American standard code for information interchange (ASCII) and Unicode
  • 1.2.2Understand how and why a computer represents sound, including the effects of the sample rate and sample resolution
  • 1.2.3Understand how and why a computer represents an image, including the effects of the resolution and colour depth

Settings

Your subjects

Untick the subjects you don't take. They leave the menu, the home page and the tracker. Your ratings are kept, so you can bring a subject back at any time.

Page style

Colours