AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Computing

Pixels, bits and sound

Week 24 · Unit 7.5: Living with AI · 3 lessons
3

Sound and letters in binary

Computing 7: Unit 7.5, pp. 150–181
GoalExplain how sound and text are stored in binary and read a simple binary code.
New words
analogue to digital converter (ADC) · a part that measures a sound and changes it into binary numbersbyte · a group of 8 bitscharacter code · the unique pattern of 8 bits that stands for one letter, number or symbolplace value · the value of a digit because of where it is in a number
Explanation

Sound is analogue. It changes smoothly, so it cannot go straight into a computer. A microphone picks it up, and an analogue to digital converter measures it many times a second. Each measurement is stored as a binary number. Text is stored in binary as well. Every key you press sends a different pattern of 8 bits to the processor. A group of 8 bits is a byte. In a binary number each place has a value: 128, 64, 32, 16, 8, 4, 2 and 1, from the left. Add the values where there is a 1. For example, the letter A has the code 01000001, because 64 + 1 = 65.

1286432168421
01000001
Worked examples
1286432168421
00001101
To change a binary number into an ordinary number, add the place values that have a 1. Here is 00001101: 8 + 4 + 1 = 13.
LetterCode
K01001011
L01001100
M01001101
N01001110
Each letter has its own code. Here are some letters. A message is just a list of codes, one byte for each letter.
Reading1234
height2574
binary010101111100
A converter measures a sound and stores each reading as a binary number. Here are four readings with heights from 0 to 7. Each reading is stored with 3 bits. All four need 12 bits.
Class activity

Secret byte message (no computer): write a chart of the letters A to J with their 8-bit codes (A = 01000001, B = 01000010, and so on, adding 1 each time). Choose a short word, write its letters as codes and give the codes to a partner. Your partner decodes it using the chart. Count the bits: letters × 8. Then try one number: write 21 in binary using the place values and check that you get 00010101. If you have a computer or tablet, an adult can help you type a short word in a text editor and count its characters, to check your bit count.

Practice
1
Decode this message using the chart: 01000011 01000001 01000111 01000101. What word is it?
LetterCode
A01000001
B01000010
C01000011
D01000100
E01000101
F01000110
G01000111
H01001000
I01001001
J01001010
2
Change 00010110 into an ordinary number.
3
How many bits does the message ‘HI MUM’ need if each character uses 8 bits? Count the space as a character.
4
Explain why a computer needs an analogue to digital converter before it can store a sound.