AQA Computer Science 8525Topic 3.3 — Fundamentals of data representationFoundation & Higher
Everything a computer stores is a pattern of ones and zeros. This topic is about how the same binary building blocks are arranged to hold numbers, text, pictures, sound and compressed data, and how you work backwards from what is stored to what it means. It is the most calculation-heavy part of Paper 2, and the calculations are all variations on the same two ideas: count the bits, and read the pattern.
What you need to know
Analogue to digital
Understand that sound is analogue and that it must be converted to a digital form for storage and processing. A real sound wave is continuous — it has every possible value at every instant, so there are infinitely many values in any time span. A computer can only store numbers, so something has to sample it.
Key fact: Sound is analogue and continuous, so it must be sampled before a computer can store it.
What a sample is
Analogue signals are sampled to create the digital version of sound. A sample is a measure of amplitude at a point in time. So the digital version of a sound is a list of numbers, each one saying how loud the wave was at one particular moment. The set of them together is the digital approximation of the original wave.
Key fact: A sample is a measure of amplitude at a point in time.
Sampling rate
Sampling rate is the number of samples taken in a second and is usually measured in hertz, where 1 hertz = 1 sample per second. CD quality is 44,100 Hz. The rate matters because it decides how often the shape of the wave is captured, and a wave that is captured too rarely misses its peaks and starts to sound different from the original.
Key fact: Sampling rate is the number of samples per second, measured in hertz; CD quality is 44,100 Hz.
Sample resolution
Sample resolution is the number of bits per sample. It decides how precisely the amplitude is recorded. 8 bits gives 256 possible values and a rough recording; 16 bits gives 65,536 and is standard CD quality. Higher resolution means more bits per sample, so a bigger file for the same duration.
Key fact: Sample resolution is the number of bits per sample; 16 bits is standard CD quality.
Calculating the file size
Calculate sound file sizes based on the sampling rate and the sample resolution. File size in bits = rate x res x secs. So 44,100 Hz at 16 bits for 30 seconds is 44,100 x 16 x 30 = 21,168,000 bits, which is 2,646,000 bytes, or about 2.6 MB. The three things to check are always the same: the rate, the resolution and the number of seconds.
Key fact: File size in bits = sampling rate x sample resolution x number of seconds.
The trade-off
Both the rate and the resolution can be raised, and both make the file bigger. Higher sampling rate means the wave shape is captured more accurately; higher resolution means each capture is more precise. So the choice is a trade-off between file size and quality, and a WAV file is uncompressed, which is why a three-minute song takes far more space than an MP3 of the same recording.
Key fact: Raising the rate or the resolution improves quality and increases file size — that is the trade-off.
Flashcards
Why must sound be converted before a computer can store it?
Because sound is analogue and continuous, while a computer can only store discrete numbers.
What is a sample?
A measure of amplitude at a point in time.
What is the sampling rate?
The number of samples taken in a second, measured in hertz, where 1 Hz is 1 sample per second.
What is the sample resolution?
The number of bits used for each sample.
What is the standard CD sampling rate?
44,100 Hz.
What is the formula for the size of a sound file?
Size in bits = rate x resolution x number of seconds.
Exam questions
Written in the style of AQA Computer Science, with a mark scheme for each one. No question here is a real past paper question.
mcq1 mark
What does the sampling rate of a sound file determine?
How many bits are used for each sample
How many seconds the recording lasts
How many samples are taken each second
How loud the recording is
Mark scheme: 1 mark for identifying that the sampling rate is the number of samples taken per second, measured in hertz. The number of bits per sample is the sample resolution.
calc3 marks
A sound file is recorded at 44,100 Hz with a sample resolution of 16 bits and lasts for 30 seconds. Calculate the size of the file in bytes.
Answer: 2,646,000 bytes (44,100 x 16 x 30 = 21,168,000 bits, and 21,168,000 / 8 = 2,646,000 bytes).
six6 marks
Explain in English how sound is converted to a digital form for storage, and what the trade-off is between quality and file size.
Mark scheme: Level 1 (1-2 marks): A short answer saying sound is sampled and stored as numbers, and more detail means bigger files. Level 2 (3-4 marks): A structured answer covering sampling rate, resolution and the file size formula. Level 3 (5-6 marks): A detailed answer explaining that analogue sound is continuous and must be sampled, that a sample measures amplitude at a point in time, that the sampling rate is samples per second and the resolution is bits per sample, giving the formula and a worked example, and explaining that raising either the rate or the resolution improves the accuracy of the recording but increases the file size, so there is a trade-off, and that uncompressed audio files are therefore much larger than compressed ones.