24-bit colour: three bytes per pixel

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

24-bit colour: three bytes per pixel

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. How many bits does one pixel use in 24-bit RGB colour?
A 8 bits
B 24 bits (3 x 8)
2. How many bytes does one 24-bit colour pixel take up?
A 24 bytes
B 3 bytes
3. In 24-bit colour, how many bits are used for the red part of a pixel?
A 8 bits
B 24 bits
4. How many different levels can the green part of a 24-bit pixel have?
A 256 (0 to 255)
B 24
5. Which calculation gives the number of possible colours in 24-bit colour?
A 256 x 256 x 256
B 256 + 256 + 256

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
13 x 8 = 24 AThe number of different colours a 24-bit pixel can show, about 16.7 million
2256 x 256 x 256 BThree colour channels (red, green, blue) with 8 bits each gives 24 bits for every pixel
3A 24-bit pixel uses 3 bytes, because each channel (red, green, blue) takes 1 byte of 8 bits C24 bits / 8 = 3 bytes
4The colour white in 24-bit colour uses the largest value in every channel, written as three bytes D3 x 8 equals 24, not 32. A 24-bit pixel has three channels of 8 bits each.
53 x 8 = 32 bits per pixel EThe channel values must be multiplied, not added. Adding gives only 768.
6256 + 256 + 256 = 16.7 million colours F11111111 11111111 11111111

Definitions

24-bit colour

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
bitsPerPixel = 3 * _
2.
colours = 256 * 256 * ___
3.
red = 8 bits green = 8 bits blue = _ bits
4.
24 bits per pixel = _ bytes per pixel
5.
colours = 2 ^ __

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A r = 8
B g = 6
C b = 8
D total = r + g + b
Question 2
A bits = 8
B channels = 3
C total = bits + channels
D print(total)
Question 3
A bytes = 3
B bitsInByte = 8
C bits = bytes + bitsInByte
D print(bits)
Question 4
A bits = 8
B levels = 2 * bits
C print(levels)
Question 5
A colours = 256 + 256 + 256
B print(colours)
C # about 16.7 million

Answer Key

24-bit colour: three bytes per pixel
Section A: Quick Questions
Q1
B — 24 bits (3 x 8)
Q2
B — 3 bytes
Q3
A — 8 bits
Q4
A — 256 (0 to 255)
Q5
A — 256 x 256 x 256
Section B: Match the Pairs
Q1
3 x 8 = 24 → Three colour channels (red, green, blue) with 8 bits each gives 24 bits for every pixel
Q2
256 x 256 x 256 → The number of different colours a 24-bit pixel can show, about 16.7 million
Q3
A 24-bit pixel uses 3 bytes, because each channel (red, green, blue) takes 1 byte of 8 bits → 24 bits / 8 = 3 bytes
Q4
The colour white in 24-bit colour uses the largest value in every channel, written as three bytes → 11111111 11111111 11111111
Q5
3 x 8 = 32 bits per pixel → 3 x 8 equals 24, not 32. A 24-bit pixel has three channels of 8 bits each.
Q6
256 + 256 + 256 = 16.7 million colours → The channel values must be multiplied, not added. Adding gives only 768.
Section C: Definitions
Q1
24-bit colour — Each pixel uses 8 bits for red, 8 for green and 8 for blue. That is 3 bytes (24 bits) per pixel, giving 256 x 256 x 256 = about 16.7 million possible colours.
Section D: Fill in the Blanks
Q1
bitsPerPixel = 3 * 8
Q2
colours = 256 * 256 * 256
Q3
red = 8 bits green = 8 bits blue = 8 bits
Q4
24 bits per pixel = 3 bytes per pixel
Q5
colours = 2 ^ 24
Section E: Spot the Error
Q1
B — In 24-bit colour each of red, green and blue uses 8 bits. Green should be g = 8, so the total is 8 + 8 + 8 = 24 bits.
Q2
C — The 8 bits are used for each of the 3 channels, so you multiply: 8 * 3 = 24 bits. Adding gives 11, which is wrong.
Q3
C — Each byte holds 8 bits, so the number of bits is bytes * bitsInByte = 3 * 8 = 24. Adding gives 11.
Q4
B — The number of values 8 bits can store is 2 to the power of 8, written 2 ** bits. This gives 256 levels per colour. Multiplying gives only 16.
Q5
A — Each pixel has 256 choices for red, for green and for blue. The choices are multiplied: 256 * 256 * 256 = about 16.7 million colours. Adding gives only 768.