Text, sound and images
The Binary Foundation
Before understanding how specific data types are stored, we must establish the fundamental unit of digital information. Computers only understand two states: on and off. These states are represented by the digits 0 and 1, known as bits (short for binary digits). A bit is the smallest possible unit of data in a computer.
Bits are grouped together to form larger units. The most common group is the byte, which consists of 8 bits. By combining 8 bits, we can represent 2^8 = 256 different values (from 0 to 255). This grouping allows computers to store complex information like letters, numbers, and colors by assigning unique binary patterns to each item.
Representing Text
Computers cannot store letters directly; they must convert them into binary numbers. This is achieved using a character set, which is a standardized table that maps every character (letters, numbers, symbols) to a unique binary code.
The two most common character sets are ASCII and Unicode.
| Feature | ASCII |
|---|---|
| Full Name | American Standard Code for Information Interchange |
| Bits per Character | 7 bits (typically stored in 8-bit bytes) |
| Capacity | Can represent 2^7 = 128 unique characters |
| Limitations | Limited to basic English letters, numbers, and control symbols. Cannot represent emojis or many international scripts. |
| Feature | Unicode |
|---|---|
| Purpose | To represent all characters from all languages and symbols globally |
| Bits per Character | Variable (commonly 16, 32, or more bits) |
| Capacity | Can represent millions of unique characters |
| Advantages | Supports multiple languages (e.g., Chinese, Arabic) and emojis simultaneously. |
Why use Unicode? While ASCII is efficient for English text, it fails to represent the diversity of global writing systems. Unicode solves this by assigning a unique code point to every character in existence, allowing a single file to contain mixed languages and symbols.
Representing Sound
Sound is an analogue wave, meaning it is continuous and smooth. Computers are digital, meaning they process discrete (separate) values. To store sound, the computer must convert the analogue wave into digital data through a process called sampling.
During sampling, the computer measures the amplitude (height/volume) of the sound wave at regular intervals. Each measurement is converted into a binary number.
The Trade-off: There is a direct relationship between quality and storage. To improve accuracy, you must increase either the sample rate or the sample resolution. However, both actions increase the amount of data stored, leading to larger file sizes.
Sample Rate
The sample rate is the number of samples (measurements) taken per second. It is measured in Hertz (Hz) or kilohertz (kHz).
Effect on Quality: A higher sample rate captures more details of the original wave, resulting in a more accurate recording that sounds closer to the original. However, it increases the file size.
Sample Resolution (Bit Depth)
The sample resolution is the number of bits used to represent each individual sample. It determines how many different amplitude levels can be recorded.
Effect on Quality: A higher sample resolution allows for a wider range of volume levels (dynamic range), making the sound more precise and less 'blocky'. Like sample rate, increasing resolution increases the file size.
Representing Images
Digital images are composed of a grid of tiny squares called pixels (picture elements). Each pixel represents the smallest component of the image.
Calculating Image File Size: The total file size depends on both resolution and colour depth. More pixels (resolution) and more bits per pixel (colour depth) both contribute to a larger file.
Resolution
Resolution refers to the number of pixels in an image, typically expressed as width × height (e.g., 1920 \times 1080). It can also be described as the total number of pixels.
Effect on Quality: Higher resolution means more pixels, resulting in a sharper, more detailed image. However, it significantly increases file size because there are more pixels to store.
Colour Depth (Bit Depth)
Colour depth is the number of bits used to represent the colour of a single pixel. It determines how many different colours can be displayed.
Effect on Quality: Higher colour depth allows for more subtle variations in colour, reducing banding and making the image look more realistic. For example, 1-bit colour depth only allows black and white (2^1 = 2 colours), while 24-bit colour depth allows over 16 million colours (2^{24}).
Quantifying Sound File Size
When asked to explain the effect of changing sound parameters on file size, you must use the specific formula rather than just stating 'it gets bigger'. Examiners look for the mathematical relationship.
The Formula: File Size = Sample Rate × Sample Resolution × Duration. Context: Use this when a question asks how file size changes if you double the sample rate or resolution. Reasoning: This directly addresses the definition of digital storage requirements. For example, if you increase the sample rate from 44.1 kHz to 88.2 kHz (doubling it), the file size also doubles because twice as many samples are taken per second.
Defining Colour Depth Accurately
A very common error is defining colour depth as 'the number of colours in the image' or 'the number of pixels'. This is incorrect. Context: Use this definition when asked to define colour depth or bit depth. Reasoning: Examiners accept the phrase 'number of bits used per pixel' because it describes the capacity for colour, not the current content. Correct Usage: 'Colour depth is the number of bits used to represent the colour of each individual pixel.' This distinguishes it from resolution (total pixels) and the actual palette used.
⚠︎ Confusing Resolution and Colour Depth
The Error: Students often state that increasing colour depth increases the resolution of the image. The Correction: These are independent properties. Resolution is about the number of pixels (spatial detail). Colour Depth is about the bits per pixel (colour variety). You can have a high-resolution image with low colour depth (sharp but only black and white) or a low-resolution image with high colour depth (blurry but many colours).
⚠︎ Misunderstanding ASCII vs Unicode
The Error: Stating that Unicode is 'better' without explaining why, or claiming ASCII can store emojis. The Correction: ASCII is limited to 128 characters and cannot represent non-Latin scripts or emojis. Unicode is necessary for global compatibility. Key Distinction: The main disadvantage of Unicode compared to ASCII is that it requires more storage space per character because it uses more bits.
Text Representation
Q:
Describe how text is converted into binary data. [3]
A:
- A character set (such as ASCII or Unicode) is used.
- Each character in the text is assigned a unique binary value (or code).
- The computer stores these binary values sequentially to represent the full text.
Q:
State one advantage of using Unicode over ASCII. [1]
A:
Unicode can represent more characters / more languages / emojis and symbols.
Q:
State one disadvantage of using Unicode compared to ASCII. [1]
A:
Each character requires more storage space (or bits) than in ASCII.
Sound Representation
Q:
Explain how an analogue sound wave is converted into digital data. [5]
A:
- The sound is recorded using a microphone.
- The microphone converts the sound waves into an analogue electrical signal.
- An Analog-to-Digital Converter (ADC) samples the signal at regular intervals.
- Each sample measures the amplitude (height/volume) of the wave.
- Each amplitude value is converted into a unique binary number.
Q:
Explain why increasing the sample rate results in a more accurate recording. [2]
A:
- More samples are taken per second, capturing more details of the original wave.
- The digital representation is closer to the original analogue signal (less loss of information).
Q:
State two ways the accuracy of a digital sound recording can be increased. [2]
A:
- Increase the sample rate.
- Increase the sample resolution.
Q:
State one drawback of using a higher sample rate. [1]
A:
The file size increases (or requires more storage space).
Image Representation
Q:
Define the term 'colour depth'. [1]
A:
The number of bits used to represent each pixel (or colour) in the image.
Q:
State how many different colours can be represented with a colour depth of 32 bits. [1]
A:
2^{32} (or approximately 4.3 billion) different colours.
Q:
Define the term 'resolution' in the context of digital images. [1]
A:
The number of pixels high by the number of pixels wide (or total number of pixels) in the image.
Q:
Explain the effect of increasing the resolution on the quality and file size of an image. [2]
A:
- Quality increases because the image becomes sharper or has more detail.
- File size increases because there are more pixels to store.