Skip to topic
    ← Back to course topics

    Digital representation of sound — AQA A-Level Computer Science

    Digital sound representation involves converting continuous analogue acoustic waves into discrete binary values using an Analogue-to-Digital Converter (ADC) by sampling amplitude at regular intervals. Key factors determining audio fidelity and storage requirements include sample rate, sample resolution, and adherence to the Nyquist theorem to eliminate aliasing.

    Digital representation of sound explained

    Sample resolution is the number of bits used to store each individual sample of a sound wave.

    Read the full explanation

    Each sample records the amplitude of the wave at one instant, and the bit depth sets how many discrete amplitude levels are available. With 8 bits there are 2⁸ = 256 levels; with 16 bits there are 2¹⁶ = 65 536 levels. Higher sample resolution gives a finer representation of amplitude, so quantisation error (the difference between the true amplitude and the nearest stored level) is smaller and the sound is more faithful. The trade-off is file size: each extra bit per sample increases the amount of data stored and transmitted. Students should be able to explain that sample resolution affects the quality of the recorded amplitude, not how often samples are taken, which is governed by sampling rate.

    Your focus

    1. sample resolution

    Which command word is this?

    Perform mathematical operations using given sound parameters. Marks are awarded for clear working, appropriate unit conversions, and final answers with units.

    Digital representation of sound exam tips

    Topic Overview

    Digital representation of sound deals with the translation of continuous analogue sound waves into binary formats that computers can store, process, and transmit. Through Analogue-to-Digital Converters (ADCs), sound waves are sampled at regular intervals, mapping instantaneous amplitudes onto discrete binary values.

    Understanding this topic requires mastering the relationship between sample rate, sample resolution, sound fidelity, and overall storage capacity. It also encompasses alternative representation paradigms such as MIDI, equipping students to evaluate the technical trade-offs between exact acoustic reproduction and instruction-based synthesis.

    Key Concepts
    • →Analogue-to-Digital Conversion (ADC) and Digital-to-Analogue Conversion (DAC) via discrete temporal sampling.
    • →Sample rate (measured in Hertz), determining the highest reproducible frequency as defined by the Nyquist theorem.
    • →Sample resolution / bit depth, dictating the dynamic range and the extent of quantisation error.
    • →Sound file size calculations: Size = Sample Rate * Sample Resolution * Time * Channels.
    • →Musical Instrument Digital Interface (MIDI) as a vector-like, event-driven instruction format contrasted with raster-like sampled sound.
    Marking Points
    • Defines sample resolution as the number of bits used to represent each sample
    • Links the number of bits to the number of available amplitude levels, using 2ⁿ
    • Explains that higher resolution reduces quantisation error and improves quality
    • Recognises that higher resolution increases file size
    Examiner Tips
    • 💡Use the 2ⁿ relationship to compute amplitude levels when a bit depth is given
    • 💡Keep resolution (amplitude detail) and sampling rate (time detail) clearly separated in your answer
    • 💡Mention both the quality benefit and the file-size cost when asked to evaluate
    • 💡Always check whether the question specifies decimal prefixes (MB, KB = powers of 1000) or binary prefixes (MiB, KiB = powers of 1024) and show every step of division clearly.
    • 💡When explaining the Nyquist theorem, ensure you state that the sampling frequency must be 'greater than or equal to' (at least) twice the maximum frequency.
    • 💡Remember to multiply by 2 for stereo audio and keep it as 1 for mono audio in file size calculations.
    Common Mistakes
    • Confuses sample resolution with sampling rate; correct by stating resolution is bits per sample and sampling rate is samples per second
    • Treats the number of bits as the number of samples; correct by distinguishing amplitude precision from time measurements
    • States that more bits means a higher frequency can be captured; correct by noting frequency range depends on sampling rate
    • Believing that increasing the sample resolution increases the frequency range of the recording. In reality, sample resolution affects dynamic range and reduces quantisation noise, whereas sample rate determines the reproducible frequency range.
    • Assuming MIDI files are merely a compressed audio format like MP3. MIDI files contain musical commands (note pitch, velocity, duration) and generate sound through a synthesiser rather than storing digitised pressure waves.
    • Confusing bits and bytes when calculating audio storage requirements, leading to answers that are out by a factor of 8.
    Revision Plan
    1. 1Day 1: Review core definitions of sample rate, sample resolution, ADC, DAC, and quantisation error.
    2. 2Day 2: Practice multi-step audio file size calculations, incorporating mono/stereo channels and converting to KiB/MiB.
    3. 3Day 3: Study the Nyquist theorem, aliasing, and the mechanics of anti-aliasing low-pass filters.
    4. 4Day 4: Create a comparison table evaluating MIDI versus sampled audio formats across file size, editability, and fidelity.
    5. 5Day 5: Complete past paper AQA questions focusing on command words such as 'Explain', 'Calculate', and 'Compare'.
    Exam Question Types
    • 📋Calculation questions: Computing uncompressed audio file size, duration, or bit rate given sampling parameters.
    • 📋Theory explanation questions: Describing how sound is digitised by an ADC or explaining the necessity of the Nyquist theorem.
    • 📋Comparative analysis: Contrasting the advantages and disadvantages of MIDI and sampled audio for specific software scenarios.
    Command Word Expectations (AQA)
    Calculate

    Perform mathematical operations using given sound parameters. Marks are awarded for clear working, appropriate unit conversions, and final answers with units.

    Explain

    Set out the causes, effects, or technical mechanisms behind a concept (e.g., how quantisation error occurs or why aliasing happens when sampling below the Nyquist rate).

    Compare

    Identify both similarities and differences between two concepts (e.g., MIDI vs sampled audio), ensuring points are linked directly rather than discussed in isolation.

    How Students Lose Marks (Examiner Pitfalls)
    Pitfall: Stating the Nyquist theorem simply as 'sampling rate equals the frequency' rather than 'sampling rate must be at least twice the highest frequency component'.
    ❌ Weak Answer (Loses Marks):Nyquist theorem means you sample at the same frequency as the sound wave so it does not lose quality.
    Example improved answer:The Nyquist theorem states that the sampling rate must be at least twice the highest frequency present in the analogue signal (fs >= 2 * fmax) to enable accurate reproduction and prevent aliasing.
    Examiner Tip: Always specify 'at least twice' and refer to the 'highest frequency', not the average or base frequency.
    Pitfall: Claiming that MIDI files store sampled audio waveforms or recorded instrument sounds.
    ❌ Weak Answer (Loses Marks):MIDI stores compressed sound clips of musical instruments that play back through the speakers.
    Example improved answer:MIDI does not store audio waveforms; instead, it stores event messages and control instructions such as note on/off, pitch, velocity, and duration, which are synthesised by the playback device.
    Examiner Tip: Distinguish sharply between sampled audio (which records discrete measurements of sound pressure waves) and MIDI (which records digital performance metadata).
    Step-by-Step Worked Solutions

    Question: Calculate the uncompressed file size in mebibytes (MiB) of a 3-minute stereo audio recording sampled at 44.1 kHz with a 16-bit sample resolution. Show your working.

    1. 1.Step 1: Identify all given variables and standardise units: - Duration = 3 minutes = 3 * 60 = 180 seconds - Sample rate = 44.1 kHz = 44,100 samples per second - Sample resolution = 16 bits per sample - Channels = 2 (stereo)
    2. 2.Step 2: Calculate total bits using the formula: File Size (bits) = Sample Rate (Hz) * Resolution (bits) * Duration (s) * Channels: Total bits = 44,100 * 16 * 180 * 2 = 254,016,000 bits
    3. 3.Step 3: Convert bits to bytes by dividing by 8: 254,016,000 / 8 = 31,752,000 bytes
    4. 4.Step 4: Convert bytes to mebibytes (MiB) by dividing by 1,024^2 (1,048,576): 31,752,000 / 1,048,576 = 30.28100586 MiB
    Final Answer: 30.28 MiB (to 2 decimal places)

    Question: Human hearing typically detects frequencies up to 20,000 Hz. Explain why standard audio CDs use a sampling rate of 44.1 kHz rather than exactly 40 kHz.

    1. 1.Step 1: State the requirement imposed by the Nyquist theorem: To capture human hearing up to 20,000 Hz without distortion or aliasing, the minimum theoretical sampling rate is 2 * 20,000 Hz = 40,000 Hz (40 kHz).
    2. 2.Step 2: Explain physical filter limitations: Analogue-to-Digital conversion requires an anti-aliasing low-pass filter to remove frequencies above 20 kHz before sampling. Real-world analogue filters cannot attenuate frequencies with an infinitely steep cut-off slope (brick-wall filter); they require a transition band.
    3. 3.Step 3: Conclude why the extra 4.1 kHz is necessary: The margin between 40 kHz and 44.1 kHz provides a 2.05 kHz roll-off buffer on either side, allowing practical, cost-effective anti-aliasing filters to roll off without attenuating audible human frequencies (up to 20 kHz) or introducing aliasing artifacts.
    Final Answer: 44.1 kHz satisfies the Nyquist criterion (exceeding 2 * 20 kHz) while providing a practical transition band for real-world anti-aliasing low-pass filters.
    Active Recall Memory Test
    What does the Nyquist theorem state regarding the required sampling frequency?
    Key Fact: The sampling rate must be at least double the highest frequency component present in the analogue signal (fs >= 2 * fmax).
    What is quantisation error in analogue-to-digital conversion?
    Key Fact: The difference between the actual continuous analogue amplitude and the discrete approximated value assigned by the ADC.
    List three specific pieces of data contained within a standard MIDI message.
    Key Fact: Note on/off command, note pitch (frequency value), and note velocity (volume/pressure).
    What formula is used to calculate the size in bits of an uncompressed sampled sound file?
    Key Fact: File Size (bits) = Sample Rate (Hz) * Sample Resolution (bits) * Duration (seconds) * Number of Channels.
    Frequently Asked Questions
    What is the difference between sample rate and sample resolution?
    Sample rate refers to how many times per second the analogue wave is measured, expressed in Hertz (Hz). Sample resolution (bit depth) refers to the number of bits allocated to store the amplitude value of each individual sample. Higher sample rates capture higher frequencies, while higher sample resolutions reduce quantisation error and increase dynamic range.
    What happens if you sample sound below the Nyquist rate?
    If you sample sound at less than twice its highest frequency, an effect known as aliasing occurs. Aliasing causes high-frequency waves to be improperly reconstructed as false lower-frequency signals that were not present in the original audio. This creates harsh distortion that cannot be filtered out post-recording.
    Why are MIDI files so much smaller than MP3 or WAV files?
    WAV and MP3 files store sampled audio waveforms, representing thousands of digital measurements every second for every channel. In contrast, MIDI files only store concise numerical instructions (metadata) telling a synthesiser what notes to play, when, at what volume, and on which instrument. Because MIDI stores performance commands rather than the audio itself, file sizes are minuscule in comparison.
    Why does increasing sample resolution improve audio quality?
    Sample resolution defines the number of discrete amplitude levels available for quantisation (2^n levels for n bits). A higher bit depth means the gaps between discrete levels are smaller, allowing the ADC to approximate the analogue signal's amplitude with far greater accuracy. This significantly reduces quantisation distortion and lowers the background noise floor.
    Do I divide by 1000 or 1024 for audio file size calculations in AQA exams?
    AQA mark schemes strictly differentiate between decimal and binary prefixes. If the question asks for kibibytes (KiB) or mebibytes (MiB), you must divide by 1,024 or 1,024^2 respectively. If it asks for kilobytes (kB) or megabytes (MB), powers of 1,000 are standard, though showing clear working ensures you can still receive method marks if alternative conversions are accepted.