66 exam-style questions plus unlimited generated ones on this topic, at up to four difficulty levels, with full mark schemes. Notes and past-paper booklets are open to everyone. Practice needs a free account.
Or take a quick quiz: 10 questions on this subtopic in GCSE Computer Science (Edexcel), marked as you tap.
How analogue sound is sampled and stored in binary, using the terms amplitude, sample rate, bit depth and sample interval. Expect definitions, reading samples from a graph, 'explain the effect' questions and file size expressions.
Key facts
Sound is analogue, so it is sampled to be stored digitally
Sample = a measurement of the amplitude of the wave at one point in time
Sample rate = samples per second, in Hz; 1 kHz = 1000 Hz
Sample interval = 1 ÷ sample rate
Bit depth = bits per sample; amplitude values = 2bit depth
Sound file size in bits = sample rate × bit depth × seconds
Higher sample rate or bit depth: better quality, bigger file
Notes
Sampling
diagram
Sound is an analogue wave: it changes continuously. Computers can only store digital (separate binary) values, so the sound must be sampled.
A sample is a measurement of the amplitude (height) of the sound wave at one moment in time. Each sample is stored as a binary number.
Each sample (red dot) is the amplitude rounded to the nearest level. 3 bits give 8 levels, 0 to 7. The blue line is what is stored
When the samples are played back they make a close copy of the original wave, but never an exact one.
Key terms
Sample rate: the number of samples taken each second, measured in hertz (Hz). 44,100 Hz means 44,100 samples per second. 1 kHz = 1000 Hz.
Sample interval: the time between one sample and the next. Sample interval = 1 ÷ sample rate, e.g. at 1000 Hz one sample is taken every 0.001 seconds (1 millisecond).
Bit depth: the number of bits used to store each sample. n bits give 2n possible amplitude values, e.g. 3 bits give 8 values (0 to 7).
Quality and file size
Higher sample rate: the samples are closer together, so more of the changes in the wave are captured. Better quality, bigger file.
Higher bit depth: more possible amplitude values, so each sample is stored more precisely, with less rounding. Better quality, bigger file.
Lower settings give smaller files that are quicker to download or stream. Speech can be recorded at a lower sample rate than music and still be understood.
File size
File size in bits = sample rate × bit depth × duration in seconds.
Change minutes into seconds first (× 60), then divide by 8 for bytes, by 1024 for KiB, and so on.
Example: 10 seconds at 8000 Hz with a bit depth of 8 bits: 8000 × 8 × 10 = 640,000 bits = 80,000 bytes.
How to answer each type of question
Define the key terms
1 mark eachGrade 4
Sample rate: use 'number of samples' and 'each second'.
Bit depth: use 'number of bits' and 'each sample'.
Sample interval: use 'time between' samples.
Example. (a) Define the term 'sample rate'. (b) Define the term 'bit depth'.
Show the model answerHide the model answer
(a) The number of samples taken each second
(1)
(b) The number of bits used to store each sample
(1)
Calculate the sample interval
2 marksGrade 6
Divide 1 by the sample rate to get the interval in seconds.
Convert to the unit asked for (× 1000 for milliseconds).
Example. A sound is sampled at 2000 Hz. Calculate the sample interval in milliseconds. (1 second = 1000 milliseconds)
Show the model answerHide the model answer
1 ÷ 2000 = 0.0005 seconds
(1)
0.0005 × 1000 = 0.5 milliseconds
(1)
Explain the effect of changing a setting
2 marksGrade 6
Say what happens to the quality, and why (more or fewer samples, more or fewer amplitude values).
Say what happens to the file size, and by how much if you can.
Example. A podcast producer reduces the bit depth used for recording from 16 bits to 8 bits. Explain the effect of this change on the recording.
Show the model answerHide the model answer
Each sample can now have only 256 values instead of 65,536, so amplitudes are rounded more and the recording is a less accurate copy of the original (1). Each sample uses half as many bits, so the file size halves (1).
Construct an expression for the file size of a sound
2 to 3 marksGrade 7
Convert the length of the recording to seconds.
Multiply sample rate × bit depth × seconds to get bits.
Divide by 8 for bytes, then by 1024 for each step up.
Example. A 3-minute song is recorded with a sample rate of 48,000 Hz and a bit depth of 16 bits. Construct an expression to calculate the file size in kibibytes (KiB). You do not need to do the calculation.