Skip to the page
Year 9 · Spring 2 · Representations: going audio-visual

Sampling, sample rate and bit depth

PracticalPresent ▶

What this lesson covers

Topic 6 Representing sound

KS3 Computing · A computer measures the height of a sound wave thousands of times a second and saves each measurement as a binary number. This is sampling.

Computer SystemsCambridge Lower Secondary Computing 0860

You will learn to

  • Explain how sampling turns a smooth sound wave into a list of numbers.
  • Calculate a sound file's size: sample rate × bit depth × seconds × channels.
  • Use the Nyquist rule: sample at least twice as often as the highest frequency.
  • Explain how the Arduino's ADC turns a knob's voltage into a number from 0 to 1023.

Success criteria

  • I can sample a wave on squared paper and draw the stepped copy.
  • I can calculate the size of a short mono recording, with units.
  • I can say why music is sampled 44,100 times a second.
  • I can turn the knob and say what a reading of 512 means in volts.

Key words

Say each word, then read what it means. Every one is in the glossary too.

Sample rate
Sound samples taken per second, in hertz.
Bit depth
Bits per sound sample. Sets how precisely each is measured.
Analogue
Smooth and continuous, with any value possible.
Digital
Made of separate, countable steps.
ADC / DAC
Analogue-to-digital converter: turns a smooth signal into numbers.

The explanation

Read it here, or open the study page below to go one step at a time with things to try.

Sampling, step by step

  1. Pick regular moments in time.
  2. At each moment, measure how high the wave is.
  3. Round it to the nearest level you're allowed to store.
  4. Save the level as a binary number.
  5. Repeat for the whole recording.
e.g.Example

With 3 bits (levels 0–7), 8 samples might be 4, 6, 7, 6, 4, 2, 1, 2 → stored as 100 110 111 110 100 010 001 010.

Sample rate: how often

Sample rate = samples per second, in hertz (Hz). More samples = closer to the real curve.

?Why?

Why do CDs use 44,100 Hz? People hear up to about 20,000 vibrations a second. You must measure each vibration at least twice (top and bottom). So you need over 40,000 samples a second.

Bit depth: how precisely

Bit depth = bits per sample. n bits give 2ⁿ levels.

  • 3 bits → 8 levels (very rough).
  • 8 bits → 256 levels (phone calls).
  • 16 bits → 65,536 levels (CD quality).

Study it

Open the study page and go one step at a time.

The steps for this lesson

Try it

The maths

Symbols first, then the words, then the equation. Change the numbers to try your own.

Build it

Check yourself

One question at a time. The reason shows after each answer.

Saved on this device.