Text, Sound and Images
Everything on a computer — letters, music, photos — is stored as numbers. This is how.
- Width
- 800 pixels
- Height
- 600 pixels
- Colour depth
- 8 bits per pixel
//ASCII and Unicode
ASCII uses 7 bits, so it can represent 128 characters — enough for English but not for Mongolian, Chinese or emoji. Unicode uses more bits per character so it covers every writing system, but the files are larger.
//How sound is captured
A microphone produces a smooth (analogue) wave. The computer measures its height many times a second and stores each measurement as a binary number. More measurements per second, and more bits per measurement, means a recording closer to the original — and a bigger file.
//File size calculations
Learn both formulas and always state the unit. Divide bits by 8 for bytes, then by 1024 for KB.
IMAGE
size (bits) = width × height × colour depth
100 × 100 pixels, 24-bit colour
= 100 × 100 × 24 = 240 000 bits
= 30 000 bytes ≈ 29.3 KB
SOUND
size (bits) = sample rate × resolution × seconds
44 100 Hz, 16 bit, 30 seconds
= 44 100 × 16 × 30 = 21 168 000 bits
= 2 646 000 bytes ≈ 2.52 MBKEY TERMS
CHECK YOURSELF
1.An image is 200 × 100 pixels with a colour depth of 8 bits. What is its size in bytes?
2.What is the effect of INCREASING the sample rate of a sound recording?
3.Why can Unicode represent Mongolian text when ASCII cannot?