Teachers' Portal  /  A-Level Computer Science 9618  /  Information representation  /  Sampled sound
Lesson pack · A-Level Computer Science 9618 · 1.2 · AS Level

Sampled sound

Turning waves into numbers. Sound is a smooth, continuous wave, but a computer can only store whole binary numbers.

Student lesson Lab, full screen
At a glance

The shape of the lesson

Topic
Information representation
Syllabus reference
Cambridge International AS and A Level Computer Science 9618, 1.2
Level
AS Level
Duration
45 minutes, lab-led; stretches to a 60 minute block (see the contingency notes)
Position in topic
Lesson 6 of 7 in Information representation; follows Bitmap and vector graphics; leads into Lossy and lossless compression, run-length encoding
Central model
Fig. 1: the wave is measured at regular intervals and each sample is stored as a binary number
Cooperative structure
Assessment
Stage 1 check and the exam-style plenary from the student lesson, plus the worksheet as the exit task
Learning objectives

By the end of the lesson, learners can

Section by section
  • Analogue to digital: In the lab, watch one millisecond of a sound wave being sampled.
  • Rate and resolution: The two settings control accuracy in two different directions: rate is about time (left to right), resolution is about amplitude (up and down).
  • Calculating file size: Multiply samples per second by bits per sample by the number of seconds, and by 2 for stereo.
Key points to leave on the board
  • Sampling: measure the amplitude at regular intervals; store each sample in binary.
  • Rate: samples per second (Hz). Resolution: bits per sample (2n levels).
  • File size: rate × resolution × seconds (× 2 for stereo) bits.
  • Trade-off: higher rate or resolution = more accurate but larger file.
The core visual model

One picture every idea returns to

Sound is analogue data: it varies continuously. To store it, an analogue-to-digital converter samples the amplitude of the wave at regular intervals and stores each sample as a binary integer, giving digital data made of discrete values. The sampling rate is the number of samples taken per second (measured in hertz). The sampling resolution is the number of bits used for each sample, giving 2n possible amplitude levels. Raising either one makes the recording more accurate but the file larger. File size = sampling rate × sampling resolution × time (× number of channels) bits.

sampling an analogue wave at regular intervals 0 grey: analogue sound wave red: samples blue: digital version
Fig. 1: the wave is measured at regular intervals and each sample is stored as a binary number
Lesson sequence

Forty-five minutes, phase by phase

TimePhaseWhat happens in the roomGrouping
0 to 5 minHook: predictOpen with the question in the title, Turning waves into numbers.. Sound is a smooth, continuous wave, but a computer can only store whole binary numbers. Put the figure on the board: it is the one picture every idea in the lesson returns to.Whole class, then pairs
5 to 13 minTeach and check: Analogue to digitalIn the lab, watch one millisecond of a sound wave being sampled. Project tab 2 of the lab (Sampling a sound wave) and let a student drive it while the class predicts.Whole class, then pairs
13 to 21 minTeach and check: Rate and resolutionThe two settings control accuracy in two different directions: rate is about time (left to right), resolution is about amplitude (up and down). Project tab 2 of the lab (Sampling rate and resolution) and let a student drive it while the class predicts.Pairs
21 to 30 minTeach and check: Calculating file sizeMultiply samples per second by bits per sample by the number of seconds, and by 2 for stereo. Model the worked example CD-quality minute on the board, one line at a time. Your turn: Calculate the size in bytes of 10 seconds of mono sound sampled at 8000 Hz with 8-bit resolution.Jigsaw
30 to 36 minCheckThe four Stage 1 questions from the student lesson, answered on mini whiteboards or by show of fingers. Re-teach the one most get wrong.Individual, then whole class
36 to 43 minPlenaryThe exam-style questions from Stage 2, one at a time: thirty seconds alone, then a random call. The feedback lines in the key give the examiner's wording.Individual, random call
43 to 45 minExit and homeworkSet the worksheet below (6 questions, 16 marks). Learners self-assess against the objectives before they leave.Individual
Timing and contingency

Protect the parts that carry the learning

The sequence carries about fifty minutes of material, so the lab is driven by one student while the class predicts rather than explored freely. Times are a guide.

Protected: the check at 30 minutes. It is the only individual read on whether the key idea landed, and it is not cut.

Cut first if the build overruns: the last check in Calculating file size, never the check or the plenary.

In a 60 minute block: run worksheet questions 1 to 3 in class as a Rally Coach set and model both the hardest worked example and its check live.

Running the cooperative task

Jigsaw

Split the content into expert pieces. Expert groups master one piece each, then regroup so every home team has one expert per piece, and each expert teaches their piece to the team.

The full structure, with its variations and the other twelve, is on the cooperative-learning page.

Examiner traps to pre-empt

What to head off, and how

Trap learners fall intoTeaching move that pre-empts it
Say what is measured: the amplitude (height) of the wave. "Sampling records the sound" is too vague to earn the mark.Return to Analogue to digital: ask a pair to state the correct version and show it on the lab before moving on.
Sampling resolution is not the same as sampling rate.Resolution is bits per sample; rate is samples per second. Mixing them up loses marks in every part of the question.
Worksheet

Sampled sound: worksheet

6 questions, 16 marks. Written in the style of the papers; no past paper question is reproduced.

NameClassDate
Q1 · recall[2 marks]

Explain the terms sampling rate and sampling resolution.

Q2 · explain[3 marks]

Describe how a sound is converted into a digital form so that it can be stored by a computer.

Q3 · calculate[3 marks]

A 2-minute stereo recording is sampled at 48 000 Hz with a 24-bit sampling resolution. Calculate its size in MiB, to one decimal place.

Q4 · explain[2 marks]

Explain the effect of increasing the sampling resolution of a recording.

Q5 · calculate[3 marks]

A mono recording at 16 000 Hz with 16-bit resolution must be no larger than 5 MiB. Calculate the maximum whole number of seconds that can be recorded.

Q6 · analysis[3 marks]

A podcast producer reduces the sampling rate of a speech recording from 44 100 Hz to 22 050 Hz. Discuss the effects of this change.

Answer key and marking notes
Q1 · 2 marks
  • Sampling rate: the number of samples taken per second.
  • Sampling resolution: the number of bits used to store each sample.
Q2 · 3 marks
  • A microphone produces an analogue electrical signal.
  • The amplitude of the signal is measured / sampled at regular time intervals (by an ADC).
  • Each sample is rounded to the nearest level and stored as a binary number using a fixed number of bits.
Q3 · 3 marks
  • 48 000 × 24 × 2 channels × 120 s = 276 480 000 bits.
  • ÷ 8 = 34 560 000 bytes.
  • ÷ 1 048 576 = 33.0 MiB.
Q4 · 2 marks
  • More amplitude levels are available, so each sample is closer to the true amplitude and the playback is more accurate.
  • Each sample uses more bits, so the file size increases.
Q5 · 3 marks
  • 16 000 × 16 = 256 000 bits = 32 000 bytes per second.
  • 5 MiB = 5 242 880 bytes.
  • 5 242 880 ÷ 32 000 = 163.84, so 163 seconds.
Q6 · 3 marks
  • The file size halves, so it needs less storage and downloads / streams faster.
  • Fewer samples per second means quick changes and high-pitched sounds are less accurately reproduced.
  • For speech the drop in quality is usually acceptable.
Quiz

6 multiple-choice questions on this lesson

From the topic question bank. Assign them in the app for a marked score in your gradebook, or run the topic as a class game.

Q11 mark

What is meant by the sampling resolution of a sound recording?

  • AThe number of bits used to store each sample
  • BThe number of samples taken each second
  • CThe highest frequency that can be recorded
  • DThe time interval between two samples
Q21 mark

Calculate the size of a 30-second mono recording sampled at 22 050 Hz with an 8-bit sampling resolution.

  • A661 500 bytes
  • B5 292 000 bytes
  • C1 323 000 bytes
  • D82 687.5 bytes
Q31 mark

A sound engineer increases the sampling rate of a recording. Which statement describes the effect?

  • AMore samples are taken per second, so the playback is closer to the original and the file is larger
  • BEach sample has more possible amplitude levels, so the file becomes smaller
  • CThe samples are further apart in time, so quick changes in the wave are missed
  • DThe recording becomes louder, but the file size does not change
Q41 mark

How many different amplitude levels can be stored with a 6-bit sampling resolution?

  • A64
  • B63
  • C36
  • D6
Q51 mark

A 3-minute stereo track is sampled at 44 100 Hz with a 16-bit sampling resolution. What is its size, to 2 decimal places? Ignore any header.

  • A30.28 MiB
  • B15.14 MiB
  • C31.75 MiB
  • D242.25 MiB
Q61 mark

A voice recorder stores mono sound at 32 000 Hz with a 16-bit sampling resolution. Each recording is limited to 8 MiB. What is the longest whole number of seconds that can be recorded?

  • A131
  • B125
  • C262
  • D65
Quiz key
Q1: A

Sampling resolution is bits per sample, which fixes the number of amplitude levels (2n). Samples per second is the sampling rate, the time between samples is 1 ÷ rate, and the highest recordable frequency depends on the rate, not the resolution.

Q2: A

22 050 × 8 × 30 = 5 292 000 bits = 661 500 bytes. 5 292 000 is the number of bits mislabelled as bytes, 1 323 000 bytes would be a stereo recording, and 82 687.5 divides by 8 twice.

Q3: A

A higher rate means samples are closer together in time, capturing quick changes, but there are more samples to store. More amplitude levels come from increasing the resolution, and that also makes the file larger. Samples further apart describes lowering the rate, and the rate does not set the volume.

Q4: A

26 = 64 levels, numbered 0 to 63. 63 is the largest level number, not the number of levels; 36 squares 6 instead of raising 2 to the power 6; 6 is just the number of bits.

Q5: A

44 100 × 16 × 2 × 180 = 254 016 000 bits = 31 752 000 bytes; ÷ 1 048 576 = 30.28 MiB. 15.14 MiB is the mono size, 31.75 is the size in decimal MB, and 242.25 forgets to divide the bits by 8.

Q6: A

One second needs 32 000 × 16 ÷ 8 = 64 000 bytes. 8 MiB = 8 388 608 bytes, and 8 388 608 ÷ 64 000 = 131.07, so 131 whole seconds. 125 uses 8 MB (8 000 000 bytes), 262 treats each 16-bit sample as 1 byte, and 65 treats the recording as stereo.

Lab and demo

What to project

The student lesson embeds these tabs. Open them full screen on the projector; every slider has a drag handle on the stage.

Slides

Slides for this lesson

A projectable deck for every pack is on the way. Until then, present the student lesson full screen: its sections, figure and lab tabs follow the same order as the plan above.

Also for this topic

Everything else you can use

Original work by the TheLucidSTEM team. The worksheet items are written in the style of the papers; no past paper question is reproduced.
Previous lessonBitmap and vector graphics