Computers store text, images, audio, and video as sequences of bits, where each bit has one of two values: or . Different encoding methods determine how these binary patterns are interpreted.
How Binary Represents Different Media
| Data type | Binary representation |
|---|---|
| Text | Each character is assigned a binary value using a character set, such as ASCII or Unicode. For example, uppercase A has the ASCII decimal value , represented in 8-bit binary as . Unicode supports a much larger range of characters and symbols. |
| Images | A bitmap image is divided into pixels. Each pixel's colour is represented by binary values. In 24-bit colour, bits represent red, represent green, and represent blue, allowing possible colours. Resolution and colour depth affect file size and quality. |
| Audio | Analogue sound waves are measured at regular intervals through sampling. Each measurement is converted into a binary value through quantization. A higher sampling rate records more measurements per second, while a greater bit depth allows more precise amplitude values. |
| Video | Video consists of a sequence of image frames, usually combined with encoded audio. Each frame is represented as pixel data. The frame rate gives the number of frames displayed per second, while resolution and colour depth determine the data stored per frame. |
Because uncompressed media can require large amounts of storage, compression reduces file size. Lossless compression allows the original data to be reconstructed exactly, whereas lossy compression permanently removes some data to achieve a greater reduction.
Exam Technique
For an IB Computer Science A1.2 response, do not merely state that computers use zeros and ones. Explain the conversion mechanism using precise terms such as character encoding, pixels, colour depth, sampling rate, bit depth, quantization, and frames. A common misconception is that binary itself identifies the media type; instead, the same bit pattern can represent different data depending on its encoding and file format.