Cambridge IGCSE · Topic 1.2
IGCSE Computer Science 0478 / Topic 1 / IGCSE

Sound in samples.

A sound wave changes smoothly and continuously, but a computer can only store separate binary numbers. So it measures the wave many times a second and stores each measurement. How often it measures, and how precisely, decides both the quality and the file size.

The key idea

A sound wave is sampled: its amplitude (height) is measured at regular intervals and each measurement is stored as a binary number. The sample rate is the number of samples taken in a second (in hertz, Hz). The sample resolution is the number of bits per sample. Increasing either one makes the recording more accurate (closer to the original sound) but increases the file size.

sampling a sound wave at regular intervals amplitude time sample rate = samples per second (Hz) sample resolution = bits used to store each sample
Fig. 1: each blue dot is one sample of the sound wave, stored as a binary number
Section 01

Sampling the wave.

In the lab, look at the smooth sound wave and the samples taken from it. The computer keeps only the samples: the stepped line is what is played back.

Examiner trap

Say what is measured: the amplitude (height) of the sound wave, at regular time intervals. "The sound is recorded in binary" is too vague for a mark.

Section 02

Rate and resolution.

Increase the sample rate in the lab, then the resolution. Watch the stepped line get closer to the real wave, and the file size go up.

Sample rateSample resolution
Meaningnumber of samples taken in a secondnumber of bits per sample
Unithertz (Hz); 44 100 Hz is CD qualitybits; 16 bits is CD quality
Increasing itcaptures quicker changes in the wavemore amplitude levels: n bits give 2n levels
Effectmore accurate recording, but a larger file
Examiner trap

Doubling the resolution from 8 to 16 bits doubles the file size but gives 256 times as many levels (256 to 65 536). Do not mix the two up.

Stage 1 · Learn

Check what the sim just showed you

Four quick checks. Each correct answer earns XP and records this skill on your profile.

Quick check+10 XP

What is the sample rate?

Quick check+10 XP

What is the sample resolution?

Quick check+10 XP

What happens when the sample resolution is increased?

Quick check+10 XP

In the lab, what happens to the stepped line as the sample rate increases?

Section 03

Sound file size.

Each second stores (sample rate) samples, and each sample takes (resolution) bits. Multiply by the length of the track in seconds.

Worked example Size of a recording
A 1-minute recording uses a sample rate of 8000 Hz and a sample resolution of 8 bits. Calculate its size in KiB.
  1. Length = 60 seconds.
  2. Bits = 8000 × 8 × 60 = 3 840 000 bits.
  3. Bytes = 3 840 000 ÷ 8 = 480 000 bytes.
  4. KiB = 480 000 ÷ 1024 = 468.75 KiB.
Answer: 468.75 KiB
Your turn
A 5-second sound has a sample rate of 1000 Hz and a resolution of 8 bits. How many bytes is it?
Stage 2 · Exam

Exam-style questions

Unlocks once the four checks above are done. Worth more XP, written to IGCSE Paper 1 standard.

Finish the four checks above to unlock the exam questions
Exam style+20 XP

How many different amplitude levels can a 4-bit sample resolution store?

Exam style+20 XP

The sample rate of a recording is doubled. What is the effect on the file size?

Exam style+20 XP

Which settings give the most accurate recording?

Exam style+20 XP

Why must sound be sampled before a computer can store it?

Skill unlocked

Representing sound, mastered.

This skill is now recorded on your profile. Keep the chain going.

-Rank -Level -Score -Topics
Go deeper · practice
Six original Cambridge-style questions
Sampling a sound wave, sample rate and resolution, their effect on accuracy and file size, and sound file size calculations.