← ACARA Digital Technologies Years 7–8

Writing an RGB colour in binary

The RGB colour (255, 128, 0) written in binary. Each number becomes its own 8-bit byte for red, green and blue, and the three bytes are joined together to make one pixel.

Understanding Writing an RGB colour in binary in ACARA Digital Technologies Years 7–8

What it does: A single RGB number from 0 to 255 fits exactly in one 8-bit byte. The number 255 is the biggest, so all 8 bits are 1. Convert each number to its own byte, then keep the order red, green, blue. 255 gives 11111111, 0 gives 00000000 and 128 gives 10000000. Each channel gets one byte of 8 bits. The 24 bits are made up of three channels: 3 x 8 = 24. 255 is the biggest 8-bit number, so every bit is 1. 10000000 is 128. Every channel must use a full 8 bits, so we pad with leading zeros: 0 becomes 00000000.

Common mistakes: Each RGB channel is stored in one byte, and a byte is 8 bits, not 4. The comment should say 'One byte = 8 bits per channel'. 255 in binary is 11111111 (all eight bits on). 11111110 is 254. The line should be red = 255 -> 11111111.

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 153–172) 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 is the RGB colour (255, 128, 0) written in binary?
11111111 10000000 0000000011111111 1000000 0
Matches
(255, 128, 0) = 11111111 1000000 0
↓
The bytes are not each 8 bits. The 128 is only 7 bits (1000000) and the 0 has been left as a single digit.
Applying
Meanings
Term
11111111 10000000 00000000
Meaning
The RGB colour (255, 128, 0) written in binary. Each number becomes its own 8-bit byte for red, green and blue, and the three bytes are joined together to make one pixel.
Practice
11111111 10000000 00000000
Testing
Gaps
Blue 0 =
Check Answer
Spots
1# One byte = 4 bits per channel
2red = 255 -> 11111111

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

The 'Tree Frog' badge — Leap of Logic, 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 is the RGB colour (255, 128, 0) written in binary?
A. 11111111 10000000 00000000 ✓
B. 11111111 1000000 0
Each of the three numbers becomes its own 8-bit byte: 255 is 11111111, 128 is 10000000 and 0 is 00000000.
2. How many bits are used for each colour channel (red, green or blue) in 24-bit colour?
A. 8 bits (one byte) ✓
B. 24 bits
Each channel gets one byte of 8 bits. The 24 bits are made up of three channels: 3 x 8 = 24.
3. Which binary byte stores the red value 255?
A. 10000000
B. 11111111 ✓
255 is the biggest 8-bit number, so every bit is 1. 10000000 is 128.
4. The green value is 0. How is it stored in its byte?
A. 0
B. 00000000 ✓
Every channel must use a full 8 bits, so we pad with leading zeros: 0 becomes 00000000.
5. How many bytes are joined together to make one pixel's colour in 24-bit RGB?
A. 3 bytes ✓
B. 1 byte
One byte for red, one for green and one for blue are joined to make one pixel.

Match the Pairs

11111111 10000000 00000000 → The RGB colour (255, 128, 0) written as three 8-bit bytes: red, green and blue joined to make one pixel
00000000 00000000 11111111 → The RGB colour (0, 0, 255), which is pure blue, written in binary
Each colour channel (red, green or blue) uses one byte, which is 8 bits → 255 = 11111111
Join the three bytes for red, green and blue in order to make one pixel → (255, 0, 128) = 11111111 00000000 10000000
(255, 128, 0) = 11111111 1000000 0 → The bytes are not each 8 bits. The 128 is only 7 bits (1000000) and the 0 has been left as a single digit.
(0, 255, 0) = 11111111 00000000 00000000 → The bytes are in the wrong order. 11111111 is in the red position, but the 255 belongs to green, so this is pure red.

Key Term

11111111 10000000 00000000
The RGB colour (255, 128, 0) written in binary. Each number becomes its own 8-bit byte for red, green and blue, and the three bytes are joined together to make one pixel.

Fill in the Blanks

1. Red 255 = 11111111 Green 128 = 10000000 Blue 0 = 00000000
Hint: Type the 8-bit byte for the blue value of zero.
2. Each colour channel uses 8 bits (one byte).
Hint: Type the number of bits in one byte.
3. Red + green + blue = 3 bytes per pixel.
Hint: Type how many bytes are joined to make one pixel.
4. (255, 128, 0) = 11111111 10000000 00000000
Hint: Type the byte for the green value in the middle.
5. (255, 0, 0) -> 11111111 00000000 00000000
Hint: Type the byte for the maximum red value.

Spot the Error

Question 1
A # One byte = 4 bits per channel
B red = 255 -> 11111111
C green = 128 -> 10000000
D blue = 0 -> 00000000
Line A — Each RGB channel is stored in one byte, and a byte is 8 bits, not 4. The comment should say 'One byte = 8 bits per channel'.
Question 2
A colour = (255, 128, 0)
B red = 255 -> 11111110
C green = 128 -> 10000000
D blue = 0 -> 00000000
Line B — 255 in binary is 11111111 (all eight bits on). 11111110 is 254. The line should be red = 255 -> 11111111.
Question 3
A colour = (0, 255, 0)
B red = 0 -> 0000
C green = 255 -> 11111111
D blue = 0 -> 00000000
Line B — Every colour channel must be a full 8-bit byte, so 0 needs leading zeros: 00000000. Only 4 bits would break the 24-bit pixel.
Question 4
A colour = (64, 0, 255)
B red = 64 -> 10000000
C green = 0 -> 00000000
D blue = 255 -> 11111111
Line B — 10000000 is 128, not 64. The 64 place value is the second bit from the left, so 64 is 01000000.
Question 5
A colour = (255, 192, 0)
B red = 255 -> 11111111
C green = 192 -> 01100000
D blue = 0 -> 00000000
Line C — 192 = 128 + 64, so the two left-most bits are on: 11000000. 01100000 is 96.

Student with a class code? Join your class →