1.Lesson overview

Syllabus focus
Cambridge IAL syllabus reference
  • 1.2 Multimedia
  • 1.3 Compression
AQA IAL syllabus reference
  • 5.6 Representing sound
AP Computer Science Principles syllabus reference
  • 2.1 Binary Numbers
  • 2.2 Data Compression
By the end of this lesson you should be able to
  1. 1
    Explain how analogue sound is sampled and stored digitally using an ADC, and played back using a DAC.
  2. 2
    Explain how sample rate and sample resolution affect sound quality and file size.
  3. 3
    Apply Nyquist's theorem to calculate the minimum sampling rate needed to represent a signal accurately.
  4. 4
    Calculate the uncompressed size of a sound file.
  5. 5
    Explain why compression is needed for storage and transmission.
  6. 6
    Distinguish lossy and lossless compression and select an appropriate method.
  7. 7
    Compare compression approaches for text, bitmap, vector and sound files.
  8. 8
    Apply run-length encoding to encode and decode data.

Digital audio and compression both make a compromise visible: a system either stores an exact representation more efficiently or discards detail that is judged less important. Exam answers must identify what is being sampled or compressed, which information survives, and why the choice suits the use.

How this lesson fits together
  • Start with the language. Establish analogue and sample before attempting a trace or design.

  • Then explain the mechanism. Follow the lesson's core model through quantise amplitude → store samples.

  • Apply it to a system. Use the case study to connect technical choices to a constraint, risk and consequence.

  • Finish with exam reasoning. Show the working or trace, state assumptions and justify a choice against the stated requirement.

2.Foundations and Core Vocabulary

Essential terms
Analogue signal

A continuously varying physical signal, such as air-pressure change captured by a microphone.

Sample

One measurement of an analogue signal's amplitude at a particular instant.

Sampling resolution

The number of bits used to store each amplitude measurement; it controls how finely amplitude is quantised.

Lossless compression

Compression that permits the original data to be reconstructed exactly.

Lossy compression

Compression that irreversibly removes selected information to achieve a much smaller file.

ADC

An analogue-to-digital converter: samples an analogue signal at regular intervals and quantises each sample to a stored binary value. Used when recording analogue audio.

DAC

A digital-to-analogue converter: converts stored binary samples back into a continuously varying analogue signal. Used when playing digital audio back through a speaker.

A microphone converts sound-pressure variation into an analogue electrical signal. An analogue-to-digital converter (ADC) samples that signal at regular intervals and quantises each sampled amplitude to one of a fixed number of levels. The result is binary data. More frequent samples can represent faster changes in the waveform; more bits per sample can represent amplitude more accurately. Playback reverses the process: a digital-to-analogue converter (DAC) reconstructs a continuously varying analogue signal from the stored samples so that it can drive a speaker or headphones.

Technical checkpoint

Digital audio represents an analogue wave by measuring its amplitude at regular intervals and encoding each measurement with a fixed number of bits. A higher sample rate can capture more rapid changes; a higher sample resolution gives more possible amplitude levels. Both increase uncompressed file size. Compression reduces storage or transmission demand: lossless methods preserve exact original data, while lossy methods discard information considered less perceptible or less important. Run-length encoding is a simple lossless technique that records repeated runs efficiently when repetition exists.

3.Sampling rate and resolution

A smooth sound wave measured at regular intervals; each reading is rounded to the nearest allowed level, so the stored waveform is a staircase that approximates the original.
Figure 1: Sampling more often follows the shape of the wave more closely and more bits per sample allows finer heights, but both make the file larger.

Sampling rate is measured in samples per second, often hertz. Sampling resolution is bits per sample. Raising either generally increases the uncompressed file size. A low sampling rate may fail to capture high-frequency detail; a low resolution introduces quantisation noise because many nearby amplitudes are rounded to the same stored level. Channels also matter: stereo normally stores two streams rather than one.

What a complete explanation includes
  • A sample is an amplitude measurement, not a piece of sound of fixed quality.

  • Changing rate changes the number of samples; changing resolution changes the number of bits in every sample.

  • The required quality depends on use: speech, archival music and a short alert tone have different needs.

The same wave sampled at 2 bits, giving four levels and a coarse staircase, and at 3 bits, giving eight levels and a staircase that follows the wave more closely.
Figure 2: Doubling the number of levels costs one extra bit on every sample, so the file grows, but the rounding error halves.
Trace the constraint

Separate the two quality controls. Sample rate relates to how often time is measured; sample resolution relates to how finely each measured amplitude is represented. Both must be stated when explaining quality or calculating size.

Nyquist's theorem: the minimum sampling rate

If a signal is sampled too slowly, the digital recording cannot represent its higher-frequency detail accurately: the reconstructed wave can misrepresent the original frequency entirely, an effect called aliasing. Nyquist's theorem states that a signal can be reconstructed accurately only if the sampling rate is at least twice the highest frequency present in that signal.

Worked example

Human speech contains frequency components up to about 4 kHz. By Nyquist's theorem, the minimum sampling rate needed to represent it accurately is Hz. This is why telephone systems commonly sample voice at 8 kHz: sampling any slower risks losing or distorting frequency content that is actually present in the signal.

Why CD audio uses 44.1 kHz

Human hearing extends to roughly 20 kHz, so accurately representing the full audible range needs a sampling rate of at least Hz. Audio CDs sample at 44.1 kHz, comfortably above this Nyquist minimum.

4.Sampling captures time; bit depth captures amplitude

Digital audio approximates a continuous waveform at discrete times. Sample rate controls the highest frequency representable without aliasing; by the sampling theorem it must exceed twice the highest frequency of interest. Bit depth controls amplitude resolution and quantisation noise. For uncompressed PCM, size equals sample rate × bit depth × channels × duration, before headers. Lossless compression reduces size without changing decoded samples; lossy compression discards information judged less perceptually important.

5.Why compression is needed

Compression reduces storage, transmission time and bandwidth demand. Lossless methods preserve every character, pixel value or sample and are needed when an exact original must be recovered, such as program code, a database backup or a medical image. Lossy methods discard information that may be difficult to notice or less useful in context, making them suitable for many music, photograph and streaming uses when a small quality reduction is acceptable.

Compression choices by data type

Data

Useful approach

Reasoning

Plain text with repeated characters

Lossless RLE or dictionary method

Every character must remain exact; repeated runs can be represented compactly.

Photograph for a website

Often lossy image compression

A smaller transfer may be worth a controlled reduction in visual detail.

Vector drawing

Lossless compression of repeated properties or drawing instructions

Objects must remain editable and exact.

Music stream

Often lossy audio compression

Perceptually less important audio detail can be removed to reduce bitrate.

Design decision

Choose lossless compression for source material, editing or data that must be recovered exactly. Choose a suitable lossy format where smaller files and bandwidth matter more than exact reconstruction, after considering audible effect and purpose.

6.Audio size and run-length encoding

For uncompressed pulse-code-modulated audio, multiply sampling rate by sampling resolution by duration and number of channels. This gives bits; divide by eight for bytes. Run-length encoding replaces a run with a count and value, for example `AAAAABB` becomes `(5,A)(2,B)`. It is lossless, but it only helps when runs are long enough that the count-value form is shorter than the original.

RLE carried out explicitly
  1. 1
    Input pixels
    R R R R R B B G G G W
  2. 2
    Read left to right
    Stage 2
  3. 3
    Stage 3
    (5,R) (2,B) (3,G) (1,W)
  4. 4
    Decoding
    Stage 4
  5. 5
    Stage 5
    write R five times, B twice, G three times, W once
  6. 6
    Stage 6
    The decoded sequence is identical to the input.
Failure-mode check

More samples per second and more bits per sample are different changes with different effects on the recorded signal.

7.A streaming-service decision

A streaming service has limited network capacity during a live event. For a spoken news clip it may choose a lower sampling rate and a lossy codec because intelligible speech matters more than studio-quality high frequencies. For a legal audio archive, it should retain lossless masters because later analysis may require the exact original samples.

From principle to use
  1. 1
    Capture

    A microphone creates an analogue electrical signal from physical sound.

  2. 2
    Digitise

    An ADC samples and quantises the signal using a chosen rate and resolution.

  3. 3
    Distribute

    Compression and bitrate determine how much storage and network capacity the audio needs.

8.Applying the Knowledge

A defensible decision
  • Say whether the user needs exact recovery before choosing lossless or lossy compression.

  • Separate sampling rate from sampling resolution in both definitions and calculations.

  • RLE can make a file larger when values alternate frequently, so avoid claiming that it always compresses.

In an extended response, make the chain explicit: identify the technical requirement, select the relevant concept, then explain the consequence for the stated user or system. A named technology without a consequence is rarely a full justification.

9.Worked Example 1

Show every stage

Question. Estimate the uncompressed size of 30 seconds of mono audio sampled at Hz with 16-bit samples.

Step-by-step method
  1. 1
    Step 1

    Samples: per second for seconds.

  2. 2
    Step 2

    Bits: bits.

  3. 3
    Step 3

    Bytes: bytes.

  4. 4
    Step 4

    This is approximately MB in decimal units, excluding headers and compression.

Answer. The uncompressed mono recording needs bytes under the stated assumptions.

10.Worked Example 2

Apply the idea to a new situation

Question. Explain why RLE is appropriate for a simple icon but poor for a photograph with noisy detail.

Step-by-step method
  1. 1
    Step 1

    A flat-colour icon often has long horizontal or consecutive runs of the same pixel colour.

  2. 2
    Step 2

    RLE can replace each long run with one count and one colour value.

  3. 3
    Step 3

    A detailed photograph changes colour frequently, so runs may have length one or two.

  4. 4
    Step 4

    The count-value pairs then provide little saving and may add overhead.

Answer. RLE is lossless and data-dependent: it benefits repeated consecutive values, not merely files that are visually simple.

Failure-mode check

A compression method's benefit depends on data characteristics; some data offers little repeated or redundant information.

11.Extended worked example: reason through the method

Problem

Find the raw size of 10 seconds of stereo audio at 44,100 samples/s and 16 bits/sample.

Solution with reasoning
  1. 1

    There are 44,100 samples per second per channel and two channels.

  2. 2

    ,100 × 16 × 2 × 10 = 14,112,000 bits.

  3. 3

    ,764,000, about 1.764 MB before metadata or compression.

Interpret and check

Do not count stereo twice if a stated sample rate already refers to aggregate samples; here it is explicitly per channel.

12.Exam Technique

How to gain method marks
  1. 1

    Include the number of channels in an audio-size calculation; stereo is commonly two channels.

  2. 2

    Use 'quantisation' for rounding amplitudes to available levels, not for taking samples in time.

  3. 3

    For a justification question, tie the compression method to the consequence of losing data.

Read command words carefully: describe needs what happens, explain needs a cause or consequence, and justify needs a reason that fits the scenario.

13.Common Misconceptions

Correct the idea before the exam

Misconception

Accurate correction

“A higher sampling rate means more precise amplitudes.”

Rate measures how often amplitudes are taken; sampling resolution measures the number of amplitude levels.

“Lossy means corrupted.”

Lossy compression deliberately discards selected information; it can be appropriate when exact recovery is unnecessary.

“RLE always makes data smaller.”

It only saves space when repeated adjacent values outweigh the count-value overhead.

Quick repair strategy

When a result or explanation seems too simple, return to the representation, units, assumptions and specified context. These four checks catch many high-mark errors.

14.Evidence and limits: Foundations and Core Vocabulary

The lesson gives this specific detail: card Essential terms A continuously varying physical signal, such as air-pressure change captured by a microphone. One measurement of an analogue signal's amplitude at a particular instant. The number of bits used to store each amplitude measurement; it controls how finely amplitude is quantised. Compression that permits the original data to be reconstructed exactly. Compression that irreversibly removes selected information to achieve a much smaller file. An analogue-to-digital converter: samples an analogue signal at regular intervals and quantises each sample to a stored binary value. Used when recording…

Boundary check
State what the evidence, representation, calculation, or model does establish—and what extra condition or information would be needed before extending the conclusion. Keep the focus on “Explain how analogue sound is sampled and stored digitally using an ADC, and played back using a DAC.”.

This final check makes an answer more rigorous: it connects the conclusion back to the exact case rather than relying on a memorised sentence.

15.Method checkpoint: Sampling rate and resolution

This lesson-specific route is useful when working with Sampling rate and resolution. Keep each stage visible so that a reader can check the reasoning rather than only the final claim.

  1. 1

    Input pixels

  2. 2

    Read left to right

  3. 3

    Stage 3

  4. 4

    Decoding

  5. 5

    Stage 5

Why the order matters
The method is tied to this lesson’s aim: Explain how sample rate and sample resolution affect sound quality and file size.. A skipped stage can change the interpretation or invalidate the conclusion.

16.Reasoning through Why compression is needed

Core explanation. Compression reduces storage, transmission time and bandwidth demand. Lossless methods preserve every character, pixel value or sample and are needed when an exact original must be recovered, such as program code, a database backup or a medical image. Lossy methods discard information that may be difficult to notice or less useful in context, making them suitable for many music, photograph and streaming uses when a small quality reduction is acceptable. table Compression choices by data type header-row Data Useful approach Reasoning Plain text with repeated characters Lossless RLE or dictionary method Every…

Read this as a chain: identify the object or evidence first, connect it to the relevant principle, then make a conclusion that is no broader than the evidence allows.

Explain, do not just name

Use this detail to support the learning target “Apply Nyquist's theorem to calculate the minimum sampling rate needed to represent a signal accurately.”. State why the displayed relationship leads to the outcome, rather than listing isolated facts or steps.

17.Compare the cases: Audio size and run-length encoding and A streaming-service decision

Audio size and run-length encoding

For uncompressed pulse-code-modulated audio, multiply sampling rate by sampling resolution by duration and number of channels. This gives bits; divide by eight for bytes. Run-length encoding replaces a run with a count and value, for example `AAAAABB` becomes `(5,A)(2,B)`. It is lossless, but it only helps when runs are long enough that the count-value form is shorter than the original.

timeline RLE carried out explicitly R R R R R B B G G G W Stage 2 (5,R) (2,B) (3,G) (1,W) Stage 4 write…

A streaming-service decision

A streaming service has limited network capacity during a live event. For a spoken news clip it may choose a lower sampling rate and a lossy codec because intelligible speech matters more than studio-quality high frequencies. For a legal audio archive, it should retain lossless masters because later analysis may require the exact original samples. timeline From principle to use A microphone creates an analogue electrical signal from physical sound. An ADC samples and quantises the signal using a chosen rate and resolution. Compression and bitrate determine how much storage and network capacity the audio needs.

A strong comparison identifies one shared idea, one important difference, and the condition that tells you which case or method applies. This comparison supports “Calculate the uncompressed size of a sound file.”.

18.Worked-reasoning check: A streaming-service decision

Before committing to an answer, revisit this lesson-owned case: A streaming service has limited network capacity during a live event. For a spoken news clip it may choose a lower sampling rate and a lossy codec because intelligible speech matters more than studio-quality high frequencies. For a legal audio archive, it should retain lossless masters because later analysis may require the exact original samples. timeline From principle to use A microphone creates an analogue electrical signal from physical sound. An ADC samples and quantises the signal using a chosen rate and resolution. Compression and bitrate determine how much storage and network capacity the audio needs.

Check the first consequential step

Identify the first decision, observation, calculation, model choice, or definition that controls the rest of the reasoning. Then explain what would change if that condition were altered.

This turns the earlier example into a transferable method for the stated outcome: Explain why compression is needed for storage and transmission..

19.Summary and Self-Check

Chapter summary

Digital sound is created by sampling and quantising an analogue signal using an ADC, and reconstructed on playback using a DAC. File size depends on rate, resolution, duration and channels. Nyquist's theorem sets the minimum sampling rate at twice the highest frequency present in the signal. Lossless compression preserves every value, while lossy compression trades irreversible detail for a smaller file; RLE is a lossless method for repeated runs.

Active-recall check
Sound check

What changes if 16-bit resolution becomes 8-bit at the same rate and duration? The uncompressed size halves and amplitude precision falls.

Method check

Is RLE lossy? No; it reconstructs the exact original sequence.

Choice check

Why use lossless compression for source code? Every character must be recovered exactly for the program to remain valid.

Nyquist check

What is the minimum sampling rate for a signal with a highest frequency component of 12 kHz? 2 × 12 000 = 24 000 Hz, by Nyquist's theorem.

Attempt the prompts without looking at the bold answers. If any response is incomplete, revisit the section that supplies the vocabulary, method and justification.

20.Detailed revision focus — sound-file size and justified compression

What this topic requires you to connect

This lesson is about sound-file size and justified compression. In a strong answer, name the relevant representation or mechanism, apply it to the stated evidence, then give a conclusion that fits the conditions of the question.

Syllabus-aligned checkpoints
Checkpoint 1
Secure this before moving on

Explain how analogue sound is sampled and stored digitally using an ADC, and played back using a DAC.

Checkpoint 2
Secure this before moving on

Explain how sample rate and sample resolution affect sound quality and file size.

Checkpoint 3
Secure this before moving on

Apply Nyquist's theorem to calculate the minimum sampling rate needed to represent a signal accurately.

21.Worked Example 3 — sound-file size and justified compression

Question

Estimate the uncompressed size of a 10-second stereo recording sampled at 44100 samples per second with 16 bits per sample. Then choose a compression approach for a master archive.

Method
  1. 1
    Use channels × sample rate × sample resolution × duration.
  2. 2
    Calculate 2 × 44100 × 16 × 10 = 14112000 bits.
  3. 3
    Divide by 8 before reporting bytes.
  4. 4
    For a master archive, preserve the original data rather than permanently removing it.
Answer and why it earns credit

The recording contains 1764000 bytes (about 1.764 MB decimal) before headers. A lossless method is suitable for the archive; lossy compression is more appropriate when smaller delivery files are worth a controlled loss of information.

22.High-value distinction — sample rate and sample resolution

Use the precise term
TermMeaningWhy the distinction matters
sample ratehow often the waveform is measured each secondUse sample rate only for its specific role; it is not interchangeable with sample resolution.
sample resolutionhow many bits are used to record each measurementUse sample resolution when this is the mechanism, condition or property the question actually describes.
Exam wording

When comparing these ideas, state one difference in purpose or mechanism before giving an example. A pair of definitions with no comparison does not fully answer a “compare” question.

23.Mark-ready route — sound-file size and justified compression

Reasoning sequence
  1. 1
    Identify the rule or representation
    Step 1

    Use channels × sample rate × sample resolution × duration.

  2. 2
    Apply it to the evidence
    Step 2

    Calculate 2 × 44100 × 16 × 10 = 14112000 bits.

  3. 3
    Keep the condition visible
    Step 3

    Divide by 8 before reporting bytes.

  4. 4
    Check the conclusion
    Step 4

    For a master archive, preserve the original data rather than permanently removing it.

Quality check

Before finalising, check the command word, any stated width, unit, order or condition, and whether your conclusion answers the exact scenario rather than a similar one.

24.Targeted correction and transfer — sound-file size and justified compression

Common trap

Using one channel for a stereo file, or saying RLE is automatically effective for every sound file.

Independent transfer

New situation: A music service halves the sample rate but keeps the resolution and duration unchanged. Predict the effect on file size and on the highest frequency it can represent.

Retrieval prompt

Without notes, explain the difference between sample rate and sample resolution, then outline the method from the worked example in four or fewer steps.