GCSE · Computer Science · OCR · Spec J277

Sample rate, duration, bit depth

Same sound, two files: one small, one huge. And the huge one doesn't always sound better. Squeeze a sound wave through two settings and see what gets lost.

Computer Science · Representing sound

Squeeze a wave into four heights

8 audio samples at 2 bits, 4 levels, 8 hertz, 1 channels. Bits stored: 16 bit

Sample 1 of 8
Levels4Bit depth2-bitSample rate8 HzBits stored16 bit
drag across the bars to set them

Pretend the clip lasts one second and 8 samples are taken, so the sample rate is 8 hertz. Each sample uses 2 bits, so it can only take 4 levels: 0 (the shortest bar), 1, 2 or 3 (the tallest). The wave's true heights at the 8 moments are 0.6, 1.8, 2.7, 2.2, 1.4, 0.3, 1.2 and 2.6. Set each bar to the closest level it is allowed, then look at what your stored wave has lost. Notice the bits stored: 8 samples × 2 bits = 16 bits, and painting never changes it. Every sample costs the same.

Work it out: the file size of a sound recording

bit depth × sample rate × duration

Every sample costs its bit depth in bits. The sample rate says how many samples there are each second, and the duration says how many seconds the recording lasts. Multiply the three and you have the file size in bits.

1 / 5

Computer Science · Units

You fill in the gaps

A sound recording lasts 2 minutes. Its sample rate is 4 kilohertz and its bit depth is 2 bits. What is its file size in kilobytes? (Use 1 kilobyte = 1000 bytes.)

  1. Check the units first. The bit depth is already in bits, but the sample rate is in kilohertz and the duration is in minutes. Both need converting.
  2. missing step
Which line is step 2?

Computer Science · Spot the slip

Where does this answer go wrong?

A student works out the file size of a recording with a bit depth of 6 bits, a sample rate of 500 hertz and a duration of 3 minutes. Here is their working.

A student's working — which line goes wrong?

Computer Science · Choosing settings

Max everything out?

Lena is about to record a sound. Her recorder lets her set the sample rate and the bit depth as high as she likes, and she wants the best result.

Which is closest to what you think?
How sure are you?

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

Two settings decide how faithful a digital sound is, and one multiplication tells you what the file costs.

What you need to know

  • A computer stores sound by measuring the wave's height again and again. Each measurement is called a sample.
  • Sample rate is how many samples are taken each second. It is measured in hertz (Hz).
  • Sample bit depth is the number of bits used to represent each sample.
  • Low bit depth limits the values a sample can take, so it is approximated to the closest one. Accuracy drops and distortion can appear.
  • Have a goPriya has a sample that can only take the levels 0, 1, 2 or 3. The wave's true height is 2.2. She says it will just stay 2.2. What really happens?

    It is approximated to the closest level it can take: 2.

    A sample can only hold a value its bits allow, so the true height is rounded to the nearest allowed one, and a little accuracy is lost.

  • Low sample rate misses changes between samples, so higher frequencies are lost. A higher rate captures the wave more completely.
  • Raise the bit depth or the sample rate and quality improves, but more bits are stored, so the file gets bigger.
  • Have a goPredict: you raise the sample rate and leave the bit depth and the length alone. What happens to the quality and to the file size?

    The quality improves and the file gets bigger.

    More samples each second capture the wave more completely, but every extra sample is more bits stored.

  • File size in bits = bit depth × sample rate × duration in seconds.
  • The units must match: bits, hertz and seconds. 1 kHz is 1000 Hz and 1 minute is 60 seconds, so convert first.
  • Have a goA recording's sample rate is given as 5 kilohertz. What number goes into the formula, and in what unit?

    5000, in hertz.

    The formula needs hertz, and 1 kilohertz is 1000 hertz. The tempting 5 would give an answer 1000 times too small.

  • Afterwards: bits ÷ 8 gives bytes, and bytes ÷ 1000 gives kilobytes (1 kilobyte is 1000 bytes).
  • Human ears only hear up to 20 kHz (fewer high frequencies with age), so very high settings mean big files for little perceivable gain.

The big picture

Sound is stored as samples. The sample rate is samples per second, in hertz; the bit depth is bits per sample. Low bit depth approximates samples to the closest value, hurting accuracy. Low sample rate misses changes between samples, so higher frequencies are lost. Raising either improves quality but stores more bits. File size in bits = bit depth × sample rate × duration in seconds, converted first. Very high settings give big files for little perceivable gain.

Key points

1Sample rate = samples taken per second, in hertz. Sample bit depth = bits used for each sample.
2Low bit depth: samples are approximated to the closest available value, so accuracy drops and distortion can appear. Higher bit depth is more accurate.
3Low sample rate: changes between samples can be missed, so higher frequencies are lost. A higher sample rate captures the wave more completely.
4Raising either setting improves quality but stores more bits, so the file size gets bigger.
5File size in bits = bit depth × sample rate × duration in seconds. Convert kilohertz to hertz (× 1000) and minutes to seconds (× 60) first.
6Bits ÷ 8 = bytes. Bytes ÷ 1000 = kilobytes (1 kilobyte = 1000 bytes).
7The settings are a trade-off between quality and file size that depends on how the sound is used. The ear hears up to 20 kHz, so very high settings give a big file for little perceivable gain.

Worked example

Problem

Recording A lasts 1 minute, with a sample rate of 2 kilohertz and a bit depth of 4 bits. Recording B lasts 30 seconds, with a sample rate of 4 kilohertz and a bit depth of 8 bits. Which one stores more bits, and how many times as many?

⚠ Watch out

Multiplying with the duration still in minutes (or the sample rate still in kilohertz). The formula needs seconds and hertz, so convert before you multiply.

🧠

Memory hook

Bits × hertz × seconds. Check the units, then multiply.

✓

Check yourself

A 12 second clip has a sample rate of 3 kilohertz and a bit depth of 2 bits. What is its file size in bits, and what happens if the bit depth rises to 4?

Flashcards

(11)
What is the sample rate?
The number of samples taken per second, measured in hertz.
What is the sample bit depth?
The number of bits used to represent each sample.
What does a low bit depth do to a digitised sound?
It limits the values a sample can take, so samples are approximated to the closest value. Accuracy drops and distortion can be added.
What does a low sample rate do to a digitised sound?
Changes in the wave between samples can be missed, so higher frequencies are lost.
What do higher settings give you, and what do they cost?
A higher bit depth or sample rate gives better quality, but more bits are stored, so the file is bigger.
What is the formula for a sound file's size in bits?
Bit depth × sample rate × duration.
Which units must the formula use, and what if you are given kilohertz or minutes?
Bits, hertz and seconds. Convert first: kilohertz × 1000 gives hertz, and minutes × 60 gives seconds.
How do you change bits into bytes?
Divide by 8, because 1 byte is 8 bits.
How do you change bytes into kilobytes here?
Divide by 1000, because 1 kilobyte is 1000 bytes.
What is the highest frequency the human ear can hear?
About 20 kilohertz, and fewer of the higher frequencies as people get older.
Why not always choose the highest sample rate and bit depth?
Too high gives a very large file for little perceivable gain. The right balance of quality and file size depends on how the sound is used.

Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.

Learning with Lightbulb is opening soon

You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.

Keep me posted

More OCR GCSE Computer Science topics

See the full OCR Computer Science curriculum →

How this lesson was checked. This OCR GCSE Computer Science (specification J277)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 14 November 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.