Sound Wave Representation & Sampling
Understand how continuous analogue audio waves are sampled and stored as discrete binary numbers. Explore sampling rates, sample resolutions, quantisation error, listen to in-browser synthesized audio tones, and solve interactive ADC and DAC challenges.
Sound Wave Representation & Sampling Challenge
💡 Tip: Click and drag any blue sample peg on the graph to change its quantisation level!
| Time | Analogue Level | Digital Value | Quant. Error (Δ) |
|---|---|---|---|
| t0 | +0.00 | → 100 | ±0.143 |
| t1 | +0.71 | → 110 | ±0.007 |
| t2 | +1.00 | → 111 | ±0.000 |
| t3 | +0.71 | → 110 | ±0.007 |
| t4 | +0.00 | → 100 | ±0.143 |
| t5 | -0.71 | → 001 | ±0.007 |
| t6 | -1.00 | → 000 | ±0.000 |
| t7 | -0.71 | → 001 | ±0.007 |
🔬 Quantisation Telemetry
Exam Core ConceptExam Core Rule: Increasing sample resolution (bit depth) provides more quantisation levels, which reduces quantisation error and brings the digital reconstruction closer to the original analogue wave.
📐 Sound File Size Formula
Exam FormulaFile size (bits) = Rate (Hz) × Resolution (bits) × Seconds
Example: 1 second at 44,100 Hz, 3 bits per sample:
44,100 × 3 × 1 = 132,300 bits
132,300 ÷ 8 = 16,537.5 bytes
How Sound is Converted to Digital Data (ADC & DAC)
Sound in the real world is an analogue signal: continuous pressure waves travelling through air. Because computer processors and storage systems only understand discrete binary (0s and 1s), sound must be converted into digital format using an Analogue-to-Digital Converter (ADC).
Step 1: Sampling the Wave (ADC)
At regular, fixed time intervals, the ADC measures the amplitude (electrical voltage) of the analogue sound wave. This process is called sampling.
The frequency of these snapshots is the sampling rate, measured in Hertz (Hz), where 1 Hz represents 1 sample per second.
Step 2: Quantisation & Encoding
The measured voltage is rounded to the nearest available digital level. This rounding is called quantisation.
Each discrete level is then converted into a binary number based on the sample resolution (bit depth). For example, a 3-bit depth gives 2³ = 8 levels (000 to 111).
Sampling Rate vs Sample Resolution (The Trade-Off)
A common 4-mark exam question asks students to compare sampling rate and sample resolution, and explain how they affect sound fidelity and file size.
Sampling Rate (in Hz)
- • Definition: The number of samples taken in a second, measured in hertz. One hertz is one sample per second.
- • Effect of Increasing: The wave is measured more often, so the digital version follows it more closely and the sound quality is better, but there are more samples to store, so the file is bigger.
- • Example: Music is often sampled at 44,100 Hz: 44,100 samples every second.
Sample Resolution (Bit Depth)
- • Definition: The number of bits allocated to store each individual sample.
- • Effect of Increasing: Provides more amplitude levels (n bits give 2ⁿ levels), so each sample is stored closer to the wave's real height and the sound quality is better, but every sample takes more bits, so the file is bigger.
- • Example: Audio CDs use 16-bit resolution (65,536 levels); studio recordings use 24-bit (16,777,216 levels).
Why the Digital Version Is Never Exact
Each sample is rounded to the nearest level the bits can store, so the digital version is close to the analogue wave but not exactly the same. The gap between the wave and the stored level is sometimes called quantisation error.
- • More bits per sample (a higher sample resolution) gives more levels with smaller gaps between them, so each sample is stored closer to the real amplitude.
- • More samples per second (a higher sampling rate) measures the wave more often, so less of its shape is missed between samples.
The Sound File Size Formula (GCSE Spec 3.3.7)
Always write out the complete formula and show every intermediate conversion step:
File Size (bits) = Sampling Rate (Hz) × Sample Resolution (bits) × Duration (seconds)
Divide bits by 8 to get bytes. Divide bytes by 1,000 for kilobytes (kB), and by 1,000 again for megabytes (MB).
Calculate the size in MB of a 2-minute recording sampled at 44,100 Hz with a 16-bit sample resolution.
- 1. Convert duration to seconds: 2 minutes × 60 = 120 seconds
- 2. Calculate bits: 44,100 × 16 × 120 = 84,672,000 bits
- 3. Convert to bytes: 84,672,000 ÷ 8 = 10,584,000 bytes
- 4. Convert to kB, then MB: 10,584,000 ÷ 1,000 = 10,584 kB; ÷ 1,000 = 10.584 MB
A voice note lasts 30 seconds at 8,000 Hz with an 8-bit sample resolution. Calculate its size in kB.
- 1. Calculate bits: 8,000 × 8 × 30 = 1,920,000 bits
- 2. Convert to bytes: 1,920,000 ÷ 8 = 240,000 bytes
- 3. Convert to kB: 240,000 ÷ 1,000 = 240 kB
Three Common Mistakes That Cost Marks in GCSE Exams
Mistake 1: Forgetting to Convert Minutes to Seconds
If an exam question states that a track is 3 minutes long, students frequently multiply by 3. This loses multiple marks! The sampling rate is measured in samples per second (Hz), so you must always multiply minutes by 60 before calculating: 3 × 60 = 180 seconds.
Mistake 2: Leaving the Answer in Bits (or Dividing by 1,024)
The formula gives the size in bits. If the question asks for bytes, divide by 8; for kilobytes divide the bytes by 1,000, and for megabytes divide by 1,000 again. Use 1,000, not 1,024.
Mistake 3: Confusing Sampling Rate with Sample Resolution
Remember: Sampling rate is the horizontal frequency across time (X-axis, measured in Hz). Sample resolution is the vertical number of bits per sample (Y-axis, measured in bits).
Master Every GCSE Computer Science Topic
Explore interactive calculators, binary converters, and exam checklists across all key modules of the GCSE specification.
