More colours need more binary digits

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

More colours need more binary digits

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. How many colours can one pixel show if it uses 1 bit?
A 1 colour
B 2 colours
2. How many colours can a pixel show with 2 bits?
A 4 colours
B 3 colours
3. Which list shows EVERY code for 2 bits?
A 00, 01, 10, 11
B 00, 01, 11
4. When we add one more bit, what happens to the number of colours?
A It goes up by 1
B It doubles
5. How many different codes can 3 bits make?
A 8 codes
B 6 codes

Match the Pairs

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

Left columnRight column
12^3 A000, 001, 010, 011, 100, 101, 110, 111
200, 01, 10, 11 B2^1 = 2, 2^2 = 4, 2^3 = 8
3Adding one more bit doubles the number of colours a pixel can show C2 x 2 is 4, not 2. Two bits give 4 colours, not 2.
4The 3-bit codes include every pattern from the smallest to the largest DThe list stops halfway. 3 bits have 8 codes, so 100 to 111 are missing.
52 bits can show 2 x 2 = 2 colours EWith 3 bits a pixel can show 8 different colours
63 bits: 000, 001, 010, 011 (4 colours) FEvery possible code for 2 bits, giving 4 colours

Definitions

2^bits

Fill in the Blanks

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

1.
colours = 2 _ bits
2.
colours = 2 ^ ____
3.
2 bits: 00, 01, 10, __
4.
000 001 010 011 100 ___ 110 111
5.
3 bits: 2 * 2 * 2 = _ colours

Spot the Error

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

Question 1
A bits = 3
B colours = 2 * bits
C print(colours)
Question 2
A one_bit = ["0", "1", "2"]
B print(len(one_bit))
C print("2 colours")
Question 3
A two_bits = ["00", "01"]
B two_bits += ["10", "12"]
C print(len(two_bits))
Question 4
A colours = 2
B colours = colours * 2
C colours = colours + 2
D print(colours)
Question 5
A def colours(bits)
B return 2 ** bits
C print(colours(3))

Answer Key

More colours need more binary digits
Section A: Quick Questions
Q1
B — 2 colours
Q2
A — 4 colours
Q3
A — 00, 01, 10, 11
Q4
B — It doubles
Q5
A — 8 codes
Section B: Match the Pairs
Q1
2^3 → With 3 bits a pixel can show 8 different colours
Q2
00, 01, 10, 11 → Every possible code for 2 bits, giving 4 colours
Q3
Adding one more bit doubles the number of colours a pixel can show → 2^1 = 2, 2^2 = 4, 2^3 = 8
Q4
The 3-bit codes include every pattern from the smallest to the largest → 000, 001, 010, 011, 100, 101, 110, 111
Q5
2 bits can show 2 x 2 = 2 colours → 2 x 2 is 4, not 2. Two bits give 4 colours, not 2.
Q6
3 bits: 000, 001, 010, 011 (4 colours) → The list stops halfway. 3 bits have 8 codes, so 100 to 111 are missing.
Section C: Definitions
Q1
2^bits — Each extra bit doubles the colours a pixel can show: 1 bit gives 2, 2 bits give 4 and 3 bits give 8. So the number of colours is 2 times itself, once for each bit.
Section D: Fill in the Blanks
Q1
colours = 2 ^ bits
Q2
colours = 2 ^ bits
Q3
2 bits: 00, 01, 10, 11
Q4
000 001 010 011 100 101 110 111
Q5
3 bits: 2 * 2 * 2 = 8 colours
Section E: Spot the Error
Q1
B — The number of colours is 2 multiplied by itself once for each bit, so it needs 2 ** bits. 2 * bits gives 6 for 3 bits, but 3 bits really give 8 colours.
Q2
A — A bit can only be 0 or 1, so one bit gives just 2 codes. The list should be ["0", "1"]. There is no digit 2 in binary.
Q3
B — Binary codes only use the digits 0 and 1. The last 2-bit code should be "11", not "12". The four codes are 00, 01, 10 and 11.
Q4
C — Each extra bit doubles the number of colours, so the line should multiply by 2. Adding 2 gives 6 instead of 8 colours for 3 bits.
Q5
A — A function definition must end with a colon. It should be def colours(bits):