- Understand that sound is an analogue signal that must be converted to digital for computer storage
- Describe the process of sampling an analogue sound wave
- Explain what sampling frequency (sample rate) means and how it affects quality
- Explain what bit depth means in the context of sound and how it affects quality
- Calculate the file size of a digital audio recording
- Compare WAV and MP3 audio file formats in terms of compression, quality, and file size
- I can explain what analogue and digital signals are, and why conversion is needed
- I can describe what sampling frequency means and give the standard CD sampling rate
- I can explain how higher sampling frequency and bit depth improve quality but increase file size
- I can calculate the file size of a digital audio file given sample rate, bit depth, and duration
- I can compare WAV and MP3, stating that WAV is uncompressed and MP3 is lossy compressed
Answer before the lesson begins. These check prior knowledge — it's fine if you're unsure.
1. In bitmap graphics, what term describes the number of bits used per pixel?
2. A bitmap image is 100 × 50 pixels with a bit depth of 8. What is its file size in bits?
3. Which of the following is an example of an analogue signal?
Key vocabulary
Data Representation: Sound
Sound is analogue — computers are digital
Sound is produced by vibrations in the air — pressure waves that travel to your ears and vibrate the eardrum. This is an analogue signal: it varies continuously and smoothly, taking any value along a continuous range. A microphone converts these pressure waves into an electrical signal that mirrors the shape of the original wave.
Computers, however, can only work with digital data — discrete values stored as binary numbers. To store or process sound on a computer, the continuous analogue signal must be converted into a series of numbers. This is done by a hardware component called an Analogue-to-Digital Converter (ADC).
Sampling — measuring the wave
The ADC measures (samples) the amplitude (height) of the sound wave at regular intervals. Each measurement is stored as a binary number. The more frequently the wave is measured, and the more precisely each measurement is recorded, the more accurately the digital version recreates the original sound.
Sampling frequency is the number of samples taken per second, measured in Hertz (Hz) or kilohertz (kHz). Common values:
- CD audio: 44,100 Hz (44.1 kHz) — the industry standard for music
- DVD / studio audio: 48,000 Hz or 96,000 Hz
- Telephone / voice: 8,000 Hz — adequate for speech, noticeably poor for music
The Nyquist theorem states that sampling frequency must be at least twice the highest frequency you want to capture. Humans can hear up to roughly 20,000 Hz, so a minimum sample rate of 40,000 Hz is needed — CD audio at 44.1 kHz satisfies this with a small margin.
Bit depth — accuracy per sample
Each sample is stored as a binary number. The number of bits used per sample is called the bit depth. A higher bit depth means each amplitude measurement can be recorded more precisely:
- 8-bit audio: 28 = 256 possible amplitude values — audible "stepping" artefacts
- 16-bit audio (CD standard): 216 = 65,536 possible values — the steps are imperceptibly small
- 24-bit audio (studio recording): 224 ≈ 16.7 million values
Increasing bit depth increases accuracy and therefore sound quality — but also increases file size, since more bits are stored per sample.
Calculating audio file size
The file size of an uncompressed audio file is calculated with the formula:
For stereo (two independent audio channels — left and right speaker), multiply the result by 2.
Example: a 3-minute (180-second) stereo WAV file at 44,100 Hz and 16-bit depth:
= 44,100 × 16 × 180 × 2 = 254,016,000 bits = 31,752,000 bytes ≈ 30.3 MB
This is why uncompressed audio files are large, and why compression formats like MP3 were developed.
File formats — WAV and MP3
WAV (Waveform Audio File Format) stores audio with no compression applied. Every sample is saved exactly as recorded. This gives very high quality but large file sizes — suitable for studio recording and professional audio editing, but impractical for streaming or storing large music libraries.
MP3 is a lossy compressed format. It reduces file size to roughly 10% of the equivalent WAV by permanently removing audio data that humans are statistically unlikely to notice:
- Sounds at the very high and low extremes of human hearing are removed
- When two sounds occur simultaneously and one is much louder, the quieter sound may be discarded (the masking effect)
The result is a much smaller file with acceptable quality for most listeners. A 30 MB WAV file might compress to ∼3 MB as MP3. The critical trade-off is that the removed data is permanently lost — you cannot recover a lossless version from an MP3.
| Property | WAV | MP3 |
|---|---|---|
| Compression | None (uncompressed) | Lossy compression |
| Quality | Very high — no data removed | Good — some perceptual data lost |
| File size | Large (∼30 MB per 3 min) | Small (∼3 MB per 3 min) |
| Typical use | Studio recording, editing | Music streaming, portable devices |
| Data loss | None | Permanent — cannot be undone |
Worked examples
A 10-second mono audio recording is made at a sampling frequency of 8,000 Hz and a bit depth of 8. Calculate the file size in bits and bytes.
A 1-minute stereo recording is made at 44,100 Hz and 16-bit depth. Calculate the file size in bits.
A recording is made at 44,100 Hz. A second identical-length recording is made at 22,050 Hz (half the sample rate). How does this affect file size and quality?
A 5-minute song is saved as a WAV file (44,100 Hz, 16-bit, stereo). Estimate the MP3 file size at 10% of the WAV size.
A 30-second mono audio clip is recorded at a sampling frequency of 22,050 Hz with a bit depth of 16.
Calculate the file size in bits and in bytes. Show your working.
- Write the formula: File size (bits) = sampling frequency × bit depth × duration
- Substitute values: 22,050 × 16 × 30 = 10,584,000 bits
- Convert to bytes: 10,584,000 ÷ 8 = 1,323,000 bytes ≈ 1.26 MB
- Note: The question specifies mono — no ×2 needed.
This is an extension topic — it does not appear in the mandatory N5 SQA Computer Systems exam specification. However, audio concepts (sampling, bit depth, WAV vs MP3) do appear in the WDD unit specification under "Factors affecting file size and quality". If you choose the WDD question in the exam, this content is directly relevant.
The file size calculation method is identical in structure to bitmap graphics — both use: quantity × bit depth × time or area. Recognising this pattern makes both topics easier to remember and apply.
Questions 1–4 are auto-checked. Questions 5–8 are self-marked — write your answer, then reveal the model answer to check your work.
1. What does ADC stand for in the context of audio recording? TYPE 1
2. Which of the following sampling frequencies is used for CD-quality audio? TYPE 1
3. What is the effect of increasing the bit depth of an audio recording? TYPE 1
4. An audio file has a sampling frequency of 44,100 Hz and a bit depth of 16. How many bits are stored per second for a mono recording? TYPE 1
5. Describe the process of sampling an analogue sound wave. TYPE 2
6. Explain the difference between WAV and MP3 audio file formats. TYPE 2
7. A 2-minute stereo recording is made at 44,100 Hz with a 16-bit bit depth. (a) Calculate the file size in bits. (b) Calculate the file size in megabytes (divide by 8 for bytes, then by 1,048,576 for MB). (c) Estimate the file size if saved as MP3. TYPE 3
(2 min = 120 sec; ×2 for stereo)
(b) 169,344,000 ÷ 8 = 21,168,000 bytes; ÷ 1,048,576 ≈ 20.2 MB
(c) MP3 ≈ 10% of WAV ≈ ∼2 MB
8. Explain how sampling frequency and bit depth each affect (a) audio quality and (b) file size. Use specific examples in your answer. TYPE 3
Quality — a higher sampling frequency captures more of the original wave's detail. CD audio at 44,100 Hz captures all frequencies the human ear can detect. A lower frequency such as 8,000 Hz (telephone quality) misses high-frequency information, making music sound thin or muffled.
File size — higher sampling frequency increases file size because more samples are stored per second.
Bit depth:
Quality — more bits per sample means more precise amplitude measurements. 16-bit audio (65,536 amplitude levels) is far more accurate than 8-bit (only 256 levels), which produces audible stepping artefacts.
File size — higher bit depth increases file size because each sample requires more bits of storage.
Suggested timing: ~40 minutes. Warm up 5 min; notes + diagram 15 min; worked examples 8 min; now you try 4 min; task set 8 min.
Extension status: This lesson is not assessed in the SQA N5 Computer Systems exam. Deliver it if time allows after CS3 (Graphics). It is worthwhile because audio file concepts (sampling frequency, bit depth, WAV vs MP3) appear in the WDD unit specification — pupils choosing WDD in the exam benefit directly.
Key connection to reinforce: The file size formula is structurally identical to the bitmap formula (pixels × bit depth). Making this explicit is powerful — it shows pupils the same underlying principle at work in two different contexts: "how many things × how many bits each". This cross-unit connection strengthens retention.
Key misconception to address: Pupils often say "MP3 is better quality than WAV" because it is more familiar. Correct this clearly: MP3 is smaller, not better. WAV retains all data; MP3 permanently discards some. Also watch for pupils forgetting the ×2 for stereo.
Live demo suggestion: Play the same audio clip as high-quality WAV vs heavily compressed MP3 — pupils can hear the difference, which motivates the theory. Audacity (free) lets you export at different quality settings side by side.
The Nyquist theorem: Background knowledge appropriate at this level; will not be examined at N5. Keep brief. Telephone quality at 8 kHz is a useful hook — pupils can relate to voice calls sounding different from music.
SQA command words covered: "Describe" (sampling process), "Explain" (WAV vs MP3, effect of parameters on quality and file size), "Calculate" (file size formula).