Binary Lessons
Binary Representation of Sound
|
In this lesson, students explore how sound is represented in a computer system.
In this lesson, students explore how sound is represented in a computer system. |
Learning Objectives:
Suggested time: 50 mins
Curriculum Mapping:
- Explain how sound can be sampled and stored in digital form
- Explain how sampling intervals and other considerations affect the size of a sound file and the quality of its playback
- Online tutoring services
Suggested time: 50 mins
Curriculum Mapping:
KS3 Computing:
- Understand how data of various types (including sounds) can be represented and manipulated digitally, in the form of binary digits → Students learn how sound is sampled and stored using binary, including concepts like sample rate, bit depth, and duration.
- Understand how instructions are stored and executed within a computer system → Explains how sound data is processed and played back by hardware components.
- Use logical reasoning to compare the utility of alternative algorithms for the same problem → Students explore trade-offs between sound quality and file size based on sampling parameters.
Data and Computational Thinking:
- Data and information literacy → Students calculate sound file sizes and understand how digital sound is structured.
Citizenship:
- Managing online information, copyright and ownership → Lessons include ethical considerations around sound editing and digital content use.
- 1.3 Knowledge Constructor → Students evaluate how sound is represented digitally and compare formats based on quality and size.
- 1.5 Computational Thinker → Students break down sound into samples and bits, and model how changes affect playback.
- 1.6 Creative Communicator → Students use sound editing tools to manipulate audio and express ideas.
Algorithms and Programming (AP):
- 2-AP-11: Create programs that use variables to store and modify data → Students use variables to represent sample rate, bit depth, and duration in calculations.
Data and Analysis (DA):
- 2-DA-07: Represent data in multiple ways → Sound is represented as binary sequences and visualised through waveforms.
Impacts of Computing (IC):
- 3A-IC-11: Social and economic implications of digital privacy → Ethical use of sound recordings and copyright issues are discussed.
- MS-ETS1-1: Define criteria and constraints of a design problem → Students balance sound quality vs. file size when designing digital audio.
- Science Practices: Analysing and interpreting data → Students analyse how sampling parameters affect sound fidelity and storage.
- Crosscutting Concepts: Systems and system models → Sound representation is modelled as a system of binary samples.
- RI.6.8: Evaluate arguments and claims → Students assess trade-offs in sound quality and compression.
- W.8.1: Write arguments with evidence → Students justify choices in sound encoding based on technical and ethical considerations.
- SL.7.1: Engage in collaborative discussions → Group activities around sound editing and representation foster discussion and peer learning.
Starter:
Start the lesson by playing two samples of the same track (Tenacious D - Tribute “The Best Song In The World”), each compressed at different sample rates (See below). After playing the two samples, ask the students what they notice about the two tracks.
(Source: PWNICT: (https://www.pwnict.co.uk/computingGCSE/computingResources.html)
Theory:
Next, explain that, in the previous lessons, the students looked at how numbers and pictures etc. are stored in a computer using binary and that in this lesson they will explore how a computer stores sound.
Explain that sound travels as a wave and show students the following example:
Next, explain that amplitude controls how loud the sound is and the frequency controls the pitch. Display the following example on the board:
Explain that sound waves are analogue and that, in order to store the waves digitally on the computer, we need to convert the waveform into a numerical representation so that the waveform can be stored in binary. To do this, we use an Analogue-to-Digital Convertor (ADC).
Describe how the ADC works by taking samples of the sound wave at regular intervals and display the following diagram:
Describe how the ADC works by taking samples of the sound wave at regular intervals and display the following diagram:
The effect of sample rate, duration and bit depth on the playback quality and size of a sound file
Next, explain how the quality and size of the file is affected by a number of factors - sample rate, duration and bit depth.
Sample rate
Explain that the sample rate refers to the number of samples taken every second and that the greater the frequency of the samples, the better the sound quality.
Bit depth
Also explain that bit depth refers to the number of bits used to store each sample. Just as with images, the more bits that are sampled, the better the accuracy of the sound but also the greater the file size. Inform students that typical bit depths are 16 bit and 24 bit.
Next, explain how the quality and size of the file is affected by a number of factors - sample rate, duration and bit depth.
Sample rate
Explain that the sample rate refers to the number of samples taken every second and that the greater the frequency of the samples, the better the sound quality.
Bit depth
Also explain that bit depth refers to the number of bits used to store each sample. Just as with images, the more bits that are sampled, the better the accuracy of the sound but also the greater the file size. Inform students that typical bit depths are 16 bit and 24 bit.
What is bit rate?
Explain that bit rate is simply a measure of how much data is processed for each second of sound. Inform students that the bit rate can be calculated by using the following equation:
Bit rate = sample rate × duration(s) x bit depth
Say, as with sample rate, the higher the bit rate, the better quality of the sound.
Finally, play the two samples from the beginning of the lesson and ask the students if they can identify which one was converted using the lower sampling rate.
Explain that bit rate is simply a measure of how much data is processed for each second of sound. Inform students that the bit rate can be calculated by using the following equation:
Bit rate = sample rate × duration(s) x bit depth
Say, as with sample rate, the higher the bit rate, the better quality of the sound.
Finally, play the two samples from the beginning of the lesson and ask the students if they can identify which one was converted using the lower sampling rate.
Main:
Option 1
Give students the following spreadsheet. Instruct students to fill in the following samples and map out the sound wave:
Option 1
Give students the following spreadsheet. Instruct students to fill in the following samples and map out the sound wave:
| sound_sampling_task.xlsx |
Samples:
Answer sheet:
| sound_sampling_task_answer.xlsx |
Option 2
Questions for students to consider:
- Direct students to: https://www.teachwithict.com/adc_simulator.html
- Ask students to experiment with the app by changing the sample rate and bit rate.
Questions for students to consider:
- How does the sampled waveform change when you reduce the sample rate?
- What happens to the binary values when you lower the bit depth?
- What kinds of wave shapes give simple binary patterns?
Option 3
Use Audacity (Free) to explore how sound is stored on a computer. Provide students with a sample .MP3 file (see starter). Instruct students to open the file in Audacity and zoom in to see the value of each sample. Ask students to export the sound file using different sample rates and investigate the effect the sample rate has on sound quality.
Use Audacity (Free) to explore how sound is stored on a computer. Provide students with a sample .MP3 file (see starter). Instruct students to open the file in Audacity and zoom in to see the value of each sample. Ask students to export the sound file using different sample rates and investigate the effect the sample rate has on sound quality.
Frequently Asked Question
Q1: What is binary representation of sound?
Q2: How is sound converted to binary?
Q3: What is sampling rate?
Q4: Why is binary representation important?
- A1: Sound is converted into a series of binary numbers (0s and 1s) that computers can process and store.
Q2: How is sound converted to binary?
- A2: Sound waves are sampled at regular intervals, and each sample is assigned a binary value based on its amplitude.
Q3: What is sampling rate?
- A3: The number of samples taken per second, measured in Hertz (Hz). Higher rates capture more detail.
Q4: Why is binary representation important?
- A4: It allows digital devices to store, manipulate, and transmit sound efficiently and accurately.
Tags: Binary Representation, Binary Representation of Sound, Sound, MP3, WMV, WAV, encoding, Amplitude, Frequency, Pitch, Sample rate, Tags: GCSE, KS4, Theory, Computing Theory, CS Theory, Binary, Binary Representation, binary 2, binary conversion, how to do binary conversion, counting binary, binary number to decimal, binary 101, 8 binary, binary digits, binary digit, meaning of binary