A brief note on Text, Sound and Images . Read it before a test. Try each question at the end before you open its answer.
Text A character set gives every character a binary code. ASCII uses 7 bits, so it has 128 codes. The letters are in order, and a small letter is 32 more than its capital. Unicode has far more characters, including many languages and emojis, so it needs more bits per character . Bits = = = characters × \times × bits per character. Sound The wave is sampled : its amplitude is measured at regular moments and each value is stored in binary. Sample rate: the number of samples taken in a second. Sample resolution: the number of bits per sample. b b b bits give 2 b 2^b 2 b levels. Bits = = = sample rate × \times × resolution × \times × seconds. Images An image is a grid of pixels , and each pixel's colour is stored in binary. Resolution: the number of pixels. Colour depth: the number of bits per pixel. d d d bits give 2 d 2^d 2 d colours. Bits = = = width × \times × height × \times × colour depth. One rule for all three Raise the sample rate, the sample resolution, the image resolution or the colour depth, and the quality goes up. So does the file size.
A worked example A clip is sampled 3000 times a second at 8 bits for 7 seconds.
Bits. 3000 × 8 × 7 = 168000 3000 \times 8 \times 7 = 168000 3000 × 8 × 7 = 168000 bits. Bytes. 168000 ÷ 8 = 21000 168000 \div 8 = 21000 168000 ÷ 8 = 21000 bytes. Check. Each sample is one byte, and there are 3000 × 7 = 21000 3000 \times 7 = 21000 3000 × 7 = 21000 samples. Practice with new numbers
A program to try The program works out the size of a text, a sound and an image, in bits and in bytes.
Read it first. Then run it. Which of the three is the largest?
1. Change the colour depth to 24. How many times larger is the image now?
Mistakes to avoid Mixing up rate and resolution. Rate is how often; resolution is how many bits. Colours from bits. 2 d 2^d 2 d , not 2 d 2d 2 d . Bits and bytes. Divide by 8 for bytes. Spaces count as characters. Check yourself In ASCII the letter P is 80. What is the code of the small letter p? Stuck? Show a hint Show the answerHow many levels can a sample take with a resolution of 7 bits? Stuck? Show a hint Show the answerAn image is 50 by 20 pixels with a colour depth of 8 bits. How many bytes does it need? Stuck? Show a hint Show the answerWhat happens to the size of a recording when its length is tripled? Stuck? Show a hint Show the answerGive one reason why an image with a higher colour depth looks better. Stuck? Show a hint Show the answerSources Cambridge International, IGCSE Computer Science 0478 syllabus for 2026 to 2028, section 1.2 (text, sound and images).