Information representation

Information representation

Sound: sampling rate and resolution

Multimedia AS Level 18 min read

On this page
  1. What you need to be able to do
  2. Analogue and digital
  3. Sampling: turning the wave into numbers
  4. Changing the sampling rate and resolution
  5. Sound file size
  6. Mark-scheme focus
  7. Worked examples
  8. Summary
  9. Can I do this?
  10. Quiz

What you need to be able to do

Syllabus 1.2 Multimedia: sound
  • 1.2Describe how sound is represented and encoded, using sampling, sampling rate, sampling resolution, analogue data and digital data.
  • 1.2Explain the impact of changing the sampling rate and the sampling resolution on file size and accuracy.
  • 1.2Calculate the size of a sound file.

You need: binary prefixes and bits per value from Number bases, prefixes and BCD; the same “more bits = more data” logic as Bitmap images.

Analogue and digital

Analogue data: data values that are continuously changing // can take any value in a range. Digital data: data stored as discrete (separate) binary values.

A sound is a vibration: the air pressure goes up and down smoothly, and a microphone turns that into a smoothly changing voltage. Its height at any moment is its amplitude. A computer can only store a limited list of binary numbers, so the smooth wave has to be measured at moments in time and each measurement rounded to a number.

Sampling: turning the wave into numbers

  1. The amplitude of the analogue sound wave is measured at set (regular) time intervals: each measurement is a sample.
  2. Each sample is given the nearest binary value: the number of bits for each one is the sampling resolution.
  3. The binary values are stored in sequence (in time order).
  4. On playback, the values are turned back into a voltage, step by step: an approximation of the original wave.
8 samples, 5 levelsamplitude
A low sampling rate and a low resolution: the pink digital version is a rough copy of the grey wave.
TermCredited definition
Samplingtaking measurements (of the amplitude) at regular intervals and storing the values
Sampling ratethe number of samples taken per second (per unit time), measured in hertz: 44.1 kHz = 44 100 samples every second
Sampling resolutionthe number of bits used to store each sample: n bits give \(2^n\) possible amplitude values (16 bits → 65 536)
Quantisation errorthe difference between the real amplitude and the value it is rounded to (the gap between grey and pink)
“The sampling rate is the rate of taking samples” was not credited (November 2022): it just repeats the words. Say number of samples per second.

Changing the sampling rate and resolution

8 samples, 9 levelsamplitude
Low rate: big time gaps between samples.
32 samples, 9 levelsamplitude
Higher sampling rate: smaller gaps, the digital wave follows the analogue one more closely.
32 samples, 3 levelsamplitude
Low resolution: only 3 amplitude values available, so big rounding (quantisation) errors.
32 samples, 17 levelsamplitude
Higher resolution: more amplitude values, each sample is closer to the real amplitude.
ChangeEffect on accuracy (how close to the original)Effect on file size (and why)
Increase sampling ratesmaller time gaps between samples; the digital wave is closer to the analogue wave; smaller quantisation errors; more detail (higher frequencies) capturedlarger: more samples are taken, so more bits are stored
Decrease sampling ratebigger gaps, less like the originalsmaller: fewer samples stored per second
Increase sampling resolutionmore bits per sample, so more amplitude values available; each sample is closer to the analogue amplitude; smaller quantisation errorslarger: more bits for every sample
Decrease sampling resolutionfewer values available, each sample further from the real amplitude; bigger quantisation errorssmaller: fewer bits are used to store each sample
Increase the durationno change to accuracylarger: more seconds of samples
Rate and resolution are different questions. The reports (November 2021, November 2022 twice) saw answers about the sampling rate to questions about the resolution and the other way round. Rate = how often (samples per second). Resolution = how precisely (bits per sample).

A bigger file has knock-on effects in context: it takes longer to transmit (e.g. to a smartphone), uses more bandwidth, and fills the storage faster, so fewer recordings fit (June 2024, the video doorbell).

Sound file size

File size (bits) = sampling rate (Hz) × sampling resolution (bits) × duration (seconds)
  1. Change the rate to samples per second: 44.1 kHz = 44 100, 50 kHz = 50 000 (kilo = 1000 here).
  2. Change the duration to seconds: 20 minutes = 1200 s.
  3. Multiply rate × resolution × seconds → bits; ÷ 8 → bytes; then ÷ 1000s (kB, MB) or 1024s (KiB, MiB).

1 Megabytes

A 3-minute recording uses a sampling rate of 40 kHz and a resolution of 16 bits. Size in MB?

AskedMBKnow40 000 samples/s, 16 bits, 180 sRouterate × bits × seconds ÷ 8 ÷ 10⁶

  1. 40 000 × 16 × 180 = 115 200 000 bits
  2. ÷ 8 = 14 400 000 bytes = 14.4 MB

2 Halving the rate

The same recording is re-sampled at 20 kHz. What happens to the file size and why?

Askednew sizeKnowhalf as many samplesRoutesize ∝ rate

  1. Half the samples → half the bits: 7.2 MB
  2. but the recording is less accurate (bigger gaps between samples)

3 Resolution from the number of levels

A sensor records sound with 1024 possible amplitude values. What is the sampling resolution?

Askedbits per sampleKnowlevels = 2^bitsRoutefind n

  1. \(2^{10}=1024\) → 10 bits

4 Mebibytes

A 10-second clip: 32 768 Hz, 16-bit. Size in MiB?

AskedMiBKnow÷ 1024 ÷ 1024Routecancel powers of 2

  1. \(\dfrac{32\,768\times16\times10}{8\times1024\times1024}=\dfrac{2^{15}\times2^{4}\times10}{2^{23}}=\dfrac{10}{16}=\)0.625 MiB
Beyond the syllabus: for understanding only. Stereo sound stores two channels (left and right), so it doubles the size. Cambridge questions have used one channel; if a question says “stereo”, × 2.

Mark-scheme focus

Sampling rate, then the effect of a higher sampling resolution (3 marks)

9618/11/O/N/22 Q1Paper 1 · Theory fundamentalsPart (d)3 marksFull size
(d) Sound samples are recorded and saved in a file. (i) State what is meant by sampling rate. [1] (ii) Explain the effect of increasing the sampling resolution on the sound file. [2]
Credited
  • (i) the number of samples taken per unit time / per second B1
  • (ii) increases the number of bits per sample // larger range of values B1; which means that the file size increases B1
  • or: makes the sound file more accurate // digital waveform closer to the analogue waveform // smaller quantisation errors B1
Not credited
  • (i) “the rate of taking samples” (repeats the term)
  • (ii) answers about taking more samples (that is the sampling rate)
Why

The report: in (ii) “a popular incorrect answer explained the effect of increasing the sampling rate … rather than the sampling resolution”.

From: 9618/11/O/N/22 Q1(d)

“Explain how an analogue sound wave is converted into digital data” (2 marks)

9618/13/O/N/24 Q6Paper 1 · Theory fundamentalsPart (c)(i)2 marksFull size
A computer system stores text, images and sound. (c)(i) Explain how an analogue sound wave is converted into digital data. [2]
Credited
  • Value / magnitude of the analogue wave is measured a set number of times each second / at set intervals B1
  • Each sample is given the binary number and stored in sequence B1
Not credited
  • “The sound is converted to binary” (how?)
  • “It is sampled” with no mention of measuring at intervals
Why

The two marks are the two halves of the process: measure at intervals, then a binary value per sample in order.

From: 9618/13/O/N/24 Q6(c)(i)

“Explain the impact of changing the sampling resolution on the accuracy of a sound recording” (3 marks)

9618/12/O/N/23 Q6Paper 1 · Theory fundamentalsPart (b)3 marksFull size
(b) Explain the impact of changing the sampling resolution on the accuracy of a sound recording. [3]
Credited
  • Increase: the number of bits used for each sample is increased B1
  • more values available to represent each sample // more amplitudes can be represented B1
  • each binary amplitude is closer to the analogue amplitude // quantisation errors are reduced // the digital wave is closer to the original B1
Not credited
  • “It sounds better” (not technical)
  • Points about file size (the question asks about accuracy)
  • Mixing increase and decrease in one answer
Why

Pick one direction (increase or decrease) and follow it through: more bits → more values → closer to the real amplitude.

Also accepted

The same three steps for a decrease, each reversed.

From: 9618/12/O/N/23 Q6(b)

  • One sound question in about half the papers: 2-7 marks.
  • Most asked: effect of rate / resolution on accuracy and file size (2-4 marks), how sound is represented (2-3), the terms (match or define).
  • Calculation: rarer (once in 2021-25): rate × resolution × seconds, with the kHz → Hz trap.

Worked examples

Example 1 · Three sound terms (Paper 1, 3 marks) ★ Easy
9618/13/M/J/25 Q1Paper 1 · Theory fundamentalsPart (b)3 marksFull size
(b) A teacher records an audio file of the student playing the piano. Complete the table by giving the term for each description: the number of times the amplitude is measured per time interval; the number of bits used to store each amplitude measurement; the type of sound wave before it is recorded by a computer. [3]
1 Read it with me what is actually happening?

Three definitions given, you supply the term. Watch the wording: “how many times” vs “how many bits”.

  • number of times … per time intervalhow often → rate
  • number of bits … each measurementhow precisely → resolution
  • before it is recordedcontinuous → analogue
2 What is it asking for? the target, part by part
  • (b)three terms3
3 What do we know? everything the question gives us
    4 Plan the route work backwards from what we want
    FindKey ideaAlready have itWork out firstTrap
    • Terms
      • Ratetimes per second
      • Resolutionbits per sample
      • Analoguecontinuous wave
    Is “frequency” acceptable for the first?

    The scheme's term is sampling rate: use it.

    5 Now solve it have a go on paper first, then open the worked solution
    1. the number of times the amplitude is measured per time interval → sampling rate B1
    2. the number of bits used to store each amplitude measurement → sampling resolution B1
    3. the type of sound wave before it is recorded → analogue B1
    6 Check it does the answer make sense?

    Rate ↔ times, resolution ↔ bits ✓.

    Example 2 · Duration, rate and resolution: two effects each (Paper 1, 3 marks) ★★ Medium
    9618/13/O/N/25 Q1Paper 1 · Theory fundamentalsPart (a)3 marksFull size
    (a) A student creates sound recordings. Draw two lines from each change (increase the duration of the recording; increase the sampling rate; decrease the sampling resolution) to the impacts it has on the sound file: the file size gets bigger / no change in the file size / the file size gets smaller / the accuracy of the sound file improves / no change to the accuracy / the accuracy worsens. [3]
    1 Read it with me what is actually happening?

    Each change gets two lines: one to a file-size box and one to an accuracy box.

    • two lines from each changeone size effect + one accuracy effect
    • durationlength of the recording
    2 What is it asking for? the target, part by part
    • (a)six lines3: 1 per change with both lines right
    3 What do we know? everything the question gives us
      4 Plan the route work backwards from what we want
      FindKey ideaAlready have itWork out firstTrap
      • Each change
        • Sizemore data? fewer bits?
        • Accuracycloser to the analogue wave?
        • Traplonger = more accurate
      Does a longer recording sound more accurate?

      No: every second is sampled the same way; there are just more seconds.

      5 Now solve it have a go on paper first, then open the worked solution
      1. increase the duration → file size gets bigger and no change to the accuracy B1
      2. increase the sampling rate → file size gets bigger and accuracy improves B1
      3. decrease the sampling resolution → file size gets smaller and accuracy worsens B1
      6 Check it does the answer make sense?

      Each change has exactly one size line and one accuracy line ✓.

      Example 3 · Accuracy ticks, then a file size (Paper 1, 4 marks) ★★ Medium
      9618/13/O/N/22 Q1Paper 1 · Theory fundamentalsParts (a) and (b)4 marksFull size
      A digital audio message needs to be recorded. (a) Tick one box in each row for the effect on accuracy: change the sampling rate from 40 kHz to 60 kHz; change the duration from 20 to 40 minutes; change the sampling resolution from 24 bits to 16 bits. [2] (b) The audio message is recorded with a sampling rate of 50 kHz and a sampling resolution of 16 bits. The recording is 20 minutes in length. Calculate the file size in megabytes and show your working. [2]
      1 Read it with me what is actually happening?

      (a) uses the effects table. (b) is the size formula with two unit changes hidden in it: kHz → Hz and minutes → seconds.

      • 50 kHz50 000 samples per second
      • 20 minutes1200 s
      • megabytes÷ 8 ÷ 1000 ÷ 1000
      2 What is it asking for? the target, part by part
      • (a)three ticks2
      • (b)size in MB2
      3 What do we know? everything the question gives us
      • 40 → 60 kHz
      • 20 → 40 min
      • 24 → 16 bits
      • 50 kHz, 16 bits, 20 min(b)
      4 Plan the route work backwards from what we want
      FindKey ideaAlready have itWork out firstTrap
      • (b)MB
        • Hz50 × 1000
        • Seconds20 × 60
        • Multiply× 16 bits ÷ 8 ÷ 10⁶
      What was the reported error?

      Multiplying by 50 instead of 50 000.

      How many bytes per sample?

      16 bits = 2 bytes.

      5 Now solve it have a go on paper first, then open the worked solution
      1. (a) 40 → 60 kHz: accuracy increases; 20 → 40 minutes: does not change; 24 → 16 bits: decreases B2
      2. (b) 50 000 × (20 × 60) × 16 bits = 960 000 000 bits M1
      3. ÷ 8 = 120 000 000 bytes = 120 megabytes A1
      6 Check it does the answer make sense?

      2 bytes × 50 000 × 1200 = 120 million bytes ✓. (a): 2 marks for three ticks, 1 for one or two.

      Example 4 · Describe how sound is represented; then why rate and resolution improve precision (Paper 1, 7 marks) ★★★ Hard
      9618/13/M/J/23 Q3Paper 1 · Theory fundamentalsPart (c)7 marksFull size
      (c) The video includes a sound recording. (i) Describe how sound is represented in a computer. [3] (ii) A second video is recorded. The sound needs to be more precise. Explain the reasons why increasing the sampling rate and the sampling resolution will improve the precision of the second recording. [4]

      Why it is hard: the June 2023 report: (i)'s third point (limited binary values stored in sequence) was rarely given, and (ii) was answered with definitions instead of reasons.

      1 Read it with me what is actually happening?

      (i) is the sampling process in three steps. (ii) asks for reasons why each change improves precision: two reasons for the rate, two for the resolution.

      • describe how … representedmeasure, give a binary number, store in sequence
      • explain the reasons whycause → effect, not definitions
      2 What is it asking for? the target, part by part
      • (c)(i)the process3
      • (c)(ii)2 reasons for rate + 2 for resolution4
      3 What do we know? everything the question gives us
        4 Plan the route work backwards from what we want
        FindKey ideaAlready have itWork out firstTrap
        • (ii) rate
          • Causesamples more often → smaller gaps
          • Effectdigital wave closer to analogue
        • (ii) resolution
          • Causemore bits → more amplitude values
          • Effecteach sample closer, smaller quantisation error
        • Trapjust defining rate and resolution
        What did most candidates do wrong in (ii)?

        The report: they “saw the two terms and simply wrote down the definitions without answering the question”.

        5 Now solve it have a go on paper first, then open the worked solution
        1. (i) The amplitude is recorded a set number of times a second B1; each amplitude is given a corresponding binary number B1; the binary numbers are saved in sequence B1
        2. (ii) Rate: smaller ‘gaps’ in the sound wave // recorded more often B1; the digital waveform is closer to the analogue waveform // smaller quantisation errors B1
        3. Resolution: more bits per sample // a wider range of amplitudes can be stored B1; each binary amplitude is closer to the analogue amplitude // smaller quantisation errors B1
        6 Check it does the answer make sense?

        Every (ii) point is a reason (cause → closer to the original), none is just a definition ✓.

        Summary

        • Analogue: continuously changing. Sampling: measure the amplitude at regular intervals, give each sample a binary value, store in sequence.
        • Sampling rate = samples per second; sampling resolution = bits per sample.
        • Higher rate or resolution: more accurate (closer to the analogue wave, smaller quantisation errors) and a bigger file. Longer duration: bigger file, same accuracy.
        • Size (bits) = rate (Hz) × resolution (bits) × time (s).
        If you see…do this
        “kHz”× 1000 to get samples per second
        “minutes”× 60 to get seconds
        “effect of the sampling rate”gaps between samples / how often
        “effect of the sampling resolution”bits per sample / amplitude values
        “accuracy”closer to the analogue wave, quantisation errors
        “performance” in a contextmore data → slower transmission, storage fills faster

        Can I do this?

        Anything unticked: revise that section first. All ticked: take the quiz.

        Quiz

        The multiple-choice and guided questions need JavaScript. The concept checks and exam practice below work without it.

        Concept checks

        Answer each one in your head first, then open it.

        1Why can a digital recording never be a perfect copy of the analogue sound?Show answer

        Between samples nothing is recorded, and each sample is rounded to one of a limited number of values: both lose a little information.

        2Why do CDs use 44.1 kHz?Show answer

        To capture a frequency you need more than two samples per wave. Human hearing reaches about 20 kHz, so just over twice that (44.1 kHz) captures everything we can hear.

        3Doubling the resolution from 8 to 16 bits doubles the file. Does it double the number of levels?Show answer

        No: it multiplies the levels by \(2^8=256\) (256 → 65 536), but the bits, and so the size, only double.

        Exam-style practice

        New questions, not used above. Do them on paper, then mark your work against the official mark scheme.

        Q19618/13/O/N/23 Q1Paper 1 · Theory fundamentals3 marksFull size
        (a) State what is meant by analogue data. [1] (b) Draw one line from each term (sampling, sampling rate, sampling resolution) to its most appropriate description: the number of samples taken per second; taking measurements at regular intervals and storing the values; the number of bits used to store each sample. [2]
        Show the mark scheme
        PartAnswer / workingMarksGuidance
        (a)Data values that are continuously changing // variable // any valueB1
        (b)sampling → taking measurements at regular intervals and storing the values; sampling rate → the number of samples taken per second; sampling resolution → the number of bits used to store each sampleB21 mark for 1 correct line, 2 for all 3
        Total: 3 marks
        Q29618/11/O/N/21 Q7Paper 1 · Theory fundamentalsPart (a)4 marksFull size
        Bobby is recording a sound file. (a) He repeats the recording several times, with a different sample rate each time. (i) Describe the reasons why the sound is closer to the original when a higher sample rate is used. [2] (ii) Describe the reasons why the sound file size increases when a higher sample rate is used. [2]
        Show the mark scheme
        PartAnswer / workingMarksGuidance
        (a)(i)Smaller time gaps between the samplesB1
        Makes the digital sound wave more accurate // smaller quantisation errorsB1
        (a)(ii)More samples / data are taken / recordedB1
        … so more bits are stored altogetherB1
        Total: 4 marks

        Examiner tip The report: (ii) was often answered with bit depth (resolution). A higher sample rate means more samples, not more bits per sample.

        Q39618/11/M/J/24 Q2Paper 1 · Theory fundamentalsPart (d)3 marksFull size
        A video doorbell records video when motion is detected, transmits messages to a smartphone and stores videos on internal secondary storage, overwriting them when full. (d) The digital camera has a microphone used to record sound for the video. The user changes the sampling rate from 44.1 kHz to 88.2 kHz. Describe how this change will affect the performance of the video doorbell. [3]
        Show the mark scheme
        PartAnswer / workingMarksGuidance
        (d)Data transmission to the user's smartphone will take longerB1
        … because there is more data to transmitB1
        The secondary storage device will fill faster // fewer videos can be stored long-term // videos are overwritten more oftenB1max 3
        Total: 3 marks

        Examiner tip “Performance” in a context: talk about what the bigger file does to that system (transmission, storage), not just “better sound”.

        Your progress on this note is saved when JavaScript is on.