Sound

GCSE Computer Science (Edexcel) · Edexcel 1CP2 · 2.2.3 · Data › Data representation

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.

Revision notes

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.
  • 01234567sample intervaltimeamplitude levelsound wave (black), samples (red),stored values (blue)
    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
  1. Sample rate: use 'number of samples' and 'each second'.
  2. Bit depth: use 'number of bits' and 'each sample'.
  3. 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
  1. Divide 1 by the sample rate to get the interval in seconds.
  2. 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
  1. Say what happens to the quality, and why (more or fewer samples, more or fewer amplitude values).
  2. 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
  1. Convert the length of the recording to seconds.
  2. Multiply sample rate × bit depth × seconds to get bits.
  3. 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.

Show the model answerHide the model answer
48,000 × 16 × 180 (3 minutes = 180 seconds) (1) ÷ 8 (1) ÷ 1024 (1)

Don’t lose marks

  • Saying the sample rate is 'how often the sound is recorded' without 'number of samples per second'.
  • Defining bit depth as 'the quality of the sound'. It is the number of bits used for each sample.
  • Forgetting to change minutes into seconds in file size calculations.
  • Writing 'colour depth' in a sound answer. Use the sound terms: sample rate and bit depth.
  • Saying that higher settings give an exact copy. A sampled sound is always an approximation.

More tips

Memory tricks

  • Rate = how often (samples per second); depth = how precisely (bits per sample).
  • Hz means 'per second', so 44,100 Hz is 44,100 samples every second.
  • Sample rate and sample interval work in opposite directions: double the rate and the interval halves.
  • Size check: doubling the sample rate, the bit depth or the length of the recording doubles the file size.

Exam technique

  • For 'explain the effect' questions, give the effect on quality and the effect on file size, with a reason for each.
  • In expressions, show the time in seconds clearly (e.g. 3 × 60 or 180).
  • Use the words amplitude, sample rate, bit depth and sample interval exactly: they are the terms examiners look for.

What each grade needs

What you need to be able to do, from the first marks up to the top grade.

  1. Grade 3
    State that sound is analogueSound is a continuous wave, so it must be sampled before it can be stored in binary.
  2. Grade 4
    Define sample rate and bit depthSample rate is the number of samples per second (Hz); bit depth is the number of bits per sample.
  3. Grade 5
    Read sample values from a graphRead the amplitude at each sample time and write it as a binary number.
  4. Grade 5
    Find the number of amplitude valuesA bit depth of n bits gives 2n possible amplitude values.
  5. Grade 6
    Calculate the sample intervalSample interval = 1 ÷ sample rate: the time between one sample and the next.
  6. Grade 6
    Explain effects of sample rate and bit depthIncreasing either makes the recording a closer copy of the original, but makes the file larger.
  7. Grade 7
    Construct a file size expression for soundsample rate × bit depth × duration in seconds gives the size in bits.

Quick recall

Cover the answers and test yourself. The app has these as flashcards that come back just before you'd forget them.

State what is measured each time a sample of a sound wave is taken.
The amplitude of the wave.
Define the term 'bit depth'.
The number of bits used to store each sample.
Complete the sentences using words from the list. Each word can be used once.
binary, hexadecimal, random, regular, pixels

A computer measures the height of a sound wave at ______________ intervals.
Each measurement is then stored as a ______________ number.
regular; binary
A recording can store 256 different amplitude values for each sample. State the bit depth of the recording.
8 bits
Write the letters A, B and C in the order in which the stages happen.
B, C, A
Give one reason why a sound must be converted into binary before a computer can store it.
Computers can only store and process data that is in binary.

Sample questions

Written for this site in the style of Edexcel exam questions. They are not taken from real past papers.

Question 1Easy3 marks
(a) Identify the definition of the sample rate of a sound recording.
[1]
  • The number of samples taken each second
  • The number of bits used to store each sample
  • The length of the recording in seconds
  • The loudness of the sound
(b) State what is measured each time a sample of a sound wave is taken.
[1]
(c) State the unit used for sample rate.
[1]
Show the answer and mark scheme
(a) Answer: The number of samples taken each second
(b) Answer: The amplitude of the wave.
  • the amplitude (height) of the sound wave
(c) Answer: Hertz (Hz)
  • hertz / Hz
Question 2Medium3 marks
A podcast episode is recorded with a sample rate of 44,100 Hz and a bit depth of 16 bits. The episode lasts 10 minutes.
(a) Construct an expression to calculate the file size of the episode in mebibytes (MiB).
You do not need to do the calculation.
[2]
(b) The next episode is recorded with a bit depth of 8 bits. Everything else stays the same.
State the effect of this change on the file size.
[1]
Show the answer and mark scheme
(a) Answer: 44,100 × 16 × 600 ÷ 8 ÷ 1024 ÷ 1024
  • 44,100 × 16 × 600 (10 minutes = 600 seconds) / 44,100 × 16 × 10 × 60
  • ÷ 8 ÷ 1024 ÷ 1024
(b) Answer: The file size halves.
  • the file size halves / the file is half the size (each sample uses half as many bits)
Question 3Hard4 marks
A voice assistant records speech at a sample rate of 16 kHz (16,000 samples per second).
(a) Calculate the sample interval in microseconds (µs). Show your working. (1 second = 1,000,000 µs)
[2]
(b) The developers reduce the sample rate to 8 kHz. State the new sample interval in microseconds.
[1]
(c) Give one reason why the developers might accept the lower sample rate for recording speech.
[1]
Show the answer and mark scheme
(a) Answer: 62.5 µs
  • 1 ÷ 16,000 = 0.0000625 seconds
  • 62.5 (µs)
(b) Answer: 125 µs
  • 125 (µs)
(c) Answer: Speech is still understandable, and half as much data has to be stored and sent.
  • speech is still clear enough to be understood, and the files are half the size / there is less data to send to the server / it is faster to process

More in Data representation

Stuck? Get 1-to-1 help.

Chhetri Academy tutors GCSE and A level Maths and Science online, with a free 30-minute trial lesson.