GCSE Revision Aid: This resource is designed to support your revision and may contain errors. If you find a discrepancy with your class teaching, your teacher is correct โ€” please let us know at gcserevise@scott.scottrix.co.uk.

CS21: Representing Sound

Foundation Higher AQAEdexcelOCREduqas Data Representation

How sound is converted from analogue to digital using sampling, and how sampling rate and resolution affect quality and file size.

Fastmail

๐Ÿ“‹ Analogue vs Digital Sound

Key Concept: Sound is an analogue signal - a continuous wave. Computers can only store digital data (binary 0s and 1s), so analogue sound must be converted to digital form using a process called sampling.

Sound waves are continuous - they have smooth, unbroken curves that represent changes in air pressure over time. Computers cannot store continuous data; they work with discrete binary values. The solution is to measure the sound wave at regular intervals and record each measurement as a binary number. This process is called analogue-to-digital conversion (ADC).

Analogy

Imagine drawing a smooth curve on graph paper. You can only mark points where grid lines cross. The more grid lines (higher sampling rate) and the finer the grid (higher resolution), the closer your dots will match the curve. With fewer, coarser dots, the recreation becomes blocky and inaccurate.

๐Ÿ“ Sampling Rate

Definition: Sampling rate is the number of samples taken per second, measured in Hertz (Hz). A higher sampling rate means more measurements of the sound wave are taken each second.

When digitising sound, the analogue wave is measured at regular intervals. The number of measurements taken every second is the sampling rate.

Example

A sound wave sampled at 8,000 Hz takes 8,000 measurements every second. At 44,100 Hz, it takes 44,100 measurements every second - over 5 times as many. The higher rate captures more detail of the original sound wave, especially higher frequencies.

Nyquist's Theorem

Nyquist's Theorem: To accurately reproduce a sound, the sampling rate must be at least twice the highest frequency in the sound. Human hearing ranges up to about 20,000 Hz, so CD quality uses 44,100 Hz (just over 2 x 20,000).

๐ŸŽจ Sample Resolution (Bit Depth)

Definition: Sample resolution (also called bit depth) is the number of bits used to represent each sample. More bits per sample means more possible amplitude values can be recorded.

Each sample records the amplitude (height) of the sound wave at that point. The sample resolution determines how precisely the amplitude is measured:

Sample Resolution Bits per Sample Number of Amplitude Values Example Use
8-bit 8 256 Telephone, basic audio
16-bit 16 65,536 CD quality audio
24-bit 24 16,777,216 Studio recording
32-bit 32 4,294,967,296 Professional audio production
Key Formula:
Number of amplitude values = 2sample resolution
Example: 16-bit resolution = 216 = 65,536 possible amplitude levels
Example

With 8-bit resolution, each sample can be one of 256 values. With 16-bit resolution, each sample can be one of 65,536 values. The finer resolution means the digital recording is much closer to the smooth original wave, producing less quantisation noise and better dynamic range.

๐Ÿ“ Calculating Sound File Size

Sound File Size Formula:
File size (bits) = Sample rate x Sample resolution x Duration (seconds) x Number of channels

Where:
Sample rate = samples per second (Hz)
Sample resolution = bits per sample
Duration = length of audio in seconds
Channels = 1 for mono, 2 for stereo

To convert to bytes: divide by 8
To convert to KB: divide by 8 x 1024
To convert to MB: divide by 8 x 1024 x 1024
Worked Example 1

Calculate the file size of a 3-minute stereo audio recording at CD quality (44,100 Hz, 16-bit).

Duration = 3 x 60 = 180 seconds

File size = 44,100 x 16 x 180 x 2

= 44,100 x 16 = 705,600

= 705,600 x 180 = 127,008,000

= 127,008,000 x 2 = 254,016,000 bits

= 254,016,000 / 8 = 31,752,000 bytes

= 31,752,000 / 1024 / 1024 = 30.28 MB

Worked Example 2

Calculate the file size of a 30-second mono recording at 8,000 Hz sample rate with 8-bit resolution.

File size = 8,000 x 8 x 30 x 1

= 64,000 x 30

= 1,920,000 bits

= 1,920,000 / 8 = 240,000 bytes

= 240,000 / 1024 = 234.375 KB

Worked Example 3

A 2-minute stereo recording at 22,050 Hz with 16-bit resolution. Calculate the file size in MB.

Duration = 2 x 60 = 120 seconds

File size = 22,050 x 16 x 120 x 2

= 22,050 x 16 = 352,800

= 352,800 x 120 = 42,336,000

= 42,336,000 x 2 = 84,672,000 bits

= 84,672,000 / 8 / 1024 / 1024 = 10.09 MB

โš–๏ธ How Sampling Rate and Resolution Affect Quality and File Size

Change Effect on Quality Effect on File Size
Increase sampling rate Improves (captures more detail, higher frequencies) Increases (more samples per second)
Decrease sampling rate Degrades (loss of high frequencies, aliasing) Decreases
Increase sample resolution Improves (more amplitude levels, less quantisation noise) Increases (more bits per sample)
Decrease sample resolution Degrades (more quantisation noise, reduced dynamic range) Decreases
Use stereo instead of mono Improves (spatial sound, richer audio) Doubles (2 channels instead of 1)
Important: There is always a trade-off between sound quality and file size. Higher sampling rates and greater sample resolution produce better quality audio but require significantly more storage space. Compression can reduce file size, but may also affect quality.
Comparison

CD quality (44,100 Hz, 16-bit, stereo) for 1 minute = ~10.1 MB

Telephone quality (8,000 Hz, 8-bit, mono) for 1 minute = ~469 KB

CD quality is over 20 times larger but sounds dramatically better because it captures far more of the original sound detail.

๐Ÿ” The Analogue-to-Digital Conversion Process

Step-by-Step

  1. The analogue sound wave is received by a microphone
  2. The microphone converts sound pressure into an electrical signal
  3. An analogue-to-digital converter (ADC) samples the signal at regular intervals (sampling rate)
  4. Each sample is rounded to the nearest available digital value (quantisation), determined by the sample resolution
  5. Each quantised value is encoded as a binary number
  6. The binary data is stored digitally

Playback (Digital-to-Analogue)

  1. Binary data is read from storage
  2. A digital-to-analogue converter (DAC) converts the binary values back into an electrical signal
  3. The DAC creates a smooth curve between sample points (interpolation)
  4. An amplifier and speaker convert the electrical signal back into sound waves
Note: The digital recording is never a perfect copy of the original. Accuracy depends on the sampling rate and sample resolution. Higher values mean the digital version is closer to the original analogue wave.

โš ๏ธ Common Mistakes to Avoid

Mistake Why It's Wrong How to Fix It
Forgetting to multiply by number of channels Stereo has 2 channels, doubling the data Always include channels: mono=1, stereo=2
Confusing sampling rate with sample resolution Rate is how often; resolution is how precisely Rate = samples per second (Hz); Resolution = bits per sample
Forgetting to convert minutes to seconds The formula uses seconds, not minutes Always multiply minutes by 60 first
Not converting bits to bytes when asked Exam questions usually want KB or MB Divide by 8 for bytes, then by 1024 for KB/MB
Saying "higher sampling rate = better quality" without explaining why You need to explain the connection More samples = closer to original wave = captures more detail

โ“ Practice Questions

Q1: Calculate the file size in MB of a 5-minute stereo recording sampled at 44,100 Hz with 16-bit resolution.

Q2: Explain why a higher sampling rate produces better quality sound.

Q3: What is the minimum sampling rate needed to accurately record a sound with a maximum frequency of 15,000 Hz?

Q4: A 60-second mono recording at 22,050 Hz with 16-bit resolution produces a file of how many kilobytes?

Q5: What is the difference between sampling rate and sample resolution?

โœ… Answers

  1. File size = 44,100 x 16 x 300 x 2 = 423,360,000 bits = 52,920,000 bytes = 50.47 MB
  2. A higher sampling rate takes more samples per second, which means the digital recording captures more detail of the original sound wave. This means the recreated sound is closer to the original, especially for higher frequency sounds.
  3. At least 30,000 Hz (2 x 15,000), according to Nyquist's Theorem.
  4. File size = 22,050 x 16 x 60 x 1 = 21,168,000 bits = 2,646,000 bytes = 2,584 KB
  5. Sampling rate is how many samples are taken per second (measured in Hz). Sample resolution is how many bits are used to represent each sample (measured in bits). Rate affects time-based accuracy; resolution affects amplitude accuracy.

๐ŸŽฏ Exam Tips

โš ๏ธ Common Errors

โœ— Confusing sample rate and bit depth โœ“ Sample rate is how many samples per second (Hz); bit depth is how many bits per sample. Both affect quality and file size, but they measure different things.

โœ— Thinking increasing sample rate alone guarantees CD-quality sound โœ“ CD-quality requires BOTH a sample rate of 44,100 Hz AND a bit depth of 16 bits. High sample rate with low bit depth still sounds poor.

โœ— Forgetting to multiply by the number of channels (mono/stereo) for sound file size โœ“ Stereo sound uses 2 channels, so the file size is double that of mono. Always check if the question specifies mono or stereo.

โœ— Not understanding the relationship between sample rate and Nyquist's theorem โœ“ To accurately reproduce a sound, the sample rate must be at least twice the highest frequency in the sound (Nyquist rate). Human hearing goes to ~20kHz, so CD uses 44.1kHz.

โœ๏ธ Model Answer

Full-Mark Response

A 3-minute stereo audio recording uses a sample rate of 44,100 Hz and a bit depth of 16 bits. Calculate the file size in megabytes. [3 marks]

Duration = 3 ร— 60 = 180 seconds Samples per channel = 44,100 ร— 180 = 7,938,000 Bits per sample = 16 Number of channels = 2 (stereo) File size in bits = 44,100 ร— 180 ร— 16 ร— 2 = 254,016,000 bits File size in bytes = 254,016,000 รท 8 = 31,752,000 bytes File size in MB = 31,752,000 รท 1,048,576 = 30.28 MB The file size is approximately 30.28 MB.

๐Ÿ“Š AO Deep Dive

Assessment Objective Analysis

AO1 (Computational Thinking โ€” 40%): Demonstrate knowledge and understanding of the principles and concepts of computer science, including representing sound: sample rate and bit depth for AQA 8525, OCR J277 & Edexcel 1CP2.

AO2 (Application โ€” 40%): Apply knowledge and understanding of computer science, including representing sound: sample rate and bit depth to analyse problems in computational terms and to design, write and evaluate solutions.

AO3 (Evaluation โ€” 20%): Evaluate the effectiveness, correctness and efficiency of computational solutions, including representing sound: sample rate and bit depth, and make reasoned judgements about trade-offs.

๐Ÿ“ Exam Technique

GCSE Computer Science Exam Tips:
Sound file size = sample rate ร— duration ร— bit depth ร— channels. Always check mono (1) vs stereo (2). Convert to requested unit at the end. Higher sample rate = better quality, larger file. Higher bit depth = more dynamic range, larger file. Know CD quality: 44,100 Hz, 16-bit. Nyquist: sample rate โ‰ฅ 2ร— highest frequency.

๐Ÿ“ Exam Questions by Topic

๐ŸŽฌ Video Resources

Share this page

Ready to ace your GCSE Computer Science exams?

Get the best revision books and guides to boost your grades.