← ACARA Digital Technologies Years 7–8

Text, images and sound all become integers, then binary

Encoding turns text, images and sound into whole numbers (character codes, RGB pixel values, sound samples), then stores each number as binary 0s and 1s.

Understanding Text, images and sound all become integers, then binary in ACARA Digital Technologies Years 7–8

What it does: Sound becomes a list of integer samples, and each sample is then stored as binary. Text is turned into character codes. In ASCII, 'A' is 65, and that number is stored as binary 01000001. RGB is in the order red, green, blue. Pure blue has no red, no green and full blue, so it is (0, 0, 255). The same binary storage is used for every kind of data, so there is no special storage for pictures.

Common mistakes: Binary conversion needs the number code, not the letter. It should be format(code, '08b') so the ASCII code 65 becomes 01000001. RGB values only go from 0 to 255 because each one fits in one byte (8 bits). 256 is too big, so it should be a value like 0.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 173–188) and word search (Modules 153–188).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
How does a computer store the letter 'A'?
As a character code (65 in ASCII), which is stored as binaryAs a tiny picture of the letter A saved in memory
Matches
"Hi" is stored as the letters H and i inside the computer
↓
Computers do not store letters directly. Each letter is first turned into a number code (H = 72, i = 105) and then stored as binary.
Applying
Meanings
Term
encoding
Meaning
Encoding turns text, images and sound into whole numbers (character codes, RGB pixel values, sound samples), then stores each number as binary 0s and 1s.
Practice
TEXT: A -> 65 -> 01000001
Testing
Gaps
code ←
Check Answer
Spots
2code = ord(letter)
3bits = format(letter, '08b')

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Moray Eel' badge — Lurking Debugger, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. How does a computer store the letter 'A'?
A. As a tiny picture of the letter A saved in memory
B. As a character code (65 in ASCII), which is stored as binary ✓
Text is turned into character codes. In ASCII, 'A' is 65, and that number is stored as binary 01000001.
2. What numbers describe the colour of one pixel in an image?
A. The letters of the colour name, like R-E-D
B. Red, green and blue values from 0 to 255 ✓
Each pixel stores RGB numbers. For example, pure red is (255, 0, 0). Each number is then stored as binary.
3. What is a sound sample?
A. A number measuring the volume of the sound at one moment ✓
B. A short clip of the song saved as text
Digital sound is measured many times each second. Each measurement is a whole number, which is stored as binary.
4. Which statement is true about the binary used for text, images and sound?
A. All three use the same 0s and 1s ✓
B. Each type of data needs its own special kind of binary
Binary is the same for every kind of data. What changes is the meaning of the numbers: character codes, pixel values or sound samples.
5. What is the correct order for storing an image pixel?
A. Colour, then RGB numbers, then binary ✓
B. Colour, then binary, then RGB numbers
First the colour is described as numbers (RGB). Then those whole numbers are stored as binary 0s and 1s.

Match the Pairs

CODE("A") returns 65 → The letter A is stored as the character code 65, which is then saved as binary
rgb(255, 0, 0) → One pixel is stored as three numbers (red, green, blue), here pure red, each saved as binary
A sound is measured many times a second, and each volume measurement (sample) is a whole number → samples = [0, 12, 40, 12, 0]
Every kind of data ends up as the same thing: a whole number written in binary → 65 = 01000001
"Hi" is stored as the letters H and i inside the computer → Computers do not store letters directly. Each letter is first turned into a number code (H = 72, i = 105) and then stored as binary.
Photos are stored as pictures, while sounds and text use a different kind of storage → All data is turned into whole numbers and stored as binary. Images use RGB pixel numbers, sounds use sample numbers, and text uses character codes.

Key Term

encoding
Encoding turns text, images and sound into whole numbers (character codes, RGB pixel values, sound samples), then stores each number as binary 0s and 1s.

Fill in the Blanks

1. letter ← "A" code ← 65 binary ← 01000001
Hint: Type the ASCII number that stands for the letter A, which is stored as the binary shown below it
2. colour ← "red" pixel ← (255, 0, 0) binary ← 11111111 00000000 00000000
Hint: Type the green value for a pure red pixel. The binary on the last line shows the three numbers.
3. sound ← [12, 40, 90, 40, 12] FOR EACH sample IN sound binary ← toBinary(sample)
Hint: Type the variable name for one volume measurement from the list. It is used again on the last line.
4. code ← 65 bits ← toBinary(code, 8) DISPLAY bits
Hint: Type how many bits are used to store each character code.
5. pixel ← (255, 128, 0) valuesPerPixel ← 3 bitsPerPixel ← valuesPerPixel * 8
Hint: Type how many colour numbers (red, green and blue) one pixel has.

Spot the Error

Question 1
A letter = 'A'
B code = ord(letter)
C bits = format(letter, '08b')
D print(bits)
Line C — Binary conversion needs the number code, not the letter. It should be format(code, '08b') so the ASCII code 65 becomes 01000001.
Question 2
A red = 255
B green = 0
C blue = 256
D pixel = (red, green, blue)
Line C — RGB values only go from 0 to 255 because each one fits in one byte (8 bits). 256 is too big, so it should be a value like 0.
Question 3
A samples = [0, 5, 9, 5]
B for s in samples:
C bits = format(s, '08b')
D print(s)
Line D — This prints the decimal sample number, not its binary. The program should print(bits) so each sample is shown as binary 0s and 1s.
Question 4
A word = 'Hi'
B codes = [chr(c) for c in word]
C print(codes)
Line B — chr() turns a number into a character, which is the wrong way round. To get the ASCII code of each character use ord(c).
Question 5
A rate = 44100
B sample ← 'loud'
C store(toBinary(sample))
Line B — A sound sample is a whole number measuring the volume, so it can be turned into binary. It should be sample = 200, not text.

Student with a class code? Join your class →