The largest number n bits can hold

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

The largest number n bits can hold

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. What is the largest whole number that 4 bits can hold?
A 15
B 16
2. What is the largest whole number that 8 bits can hold?
A 256
B 255
3. Which formula gives the largest whole number n bits can hold?
A 2^n
B 2^n - 1
4. Why is the largest 3-bit number 7 and not 8?
A Counting starts at 0, so 8 values run from 0 to 7
B Counting starts at 1, so 8 values run from 1 to 8
5. Which bit pattern is the largest number 4 bits can hold?
A 1111
B 1000

Match the Pairs

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

Left columnRight column
12^n - 1 AThe biggest 8-bit number, which is 255 in decimal
21111 1111 B2^8 is the number of values, not the biggest number. The largest is 2^8 - 1 = 255.
34 bits can show 16 different values, but the largest number is 15 CThe largest whole number that n bits can hold
4The largest number is one less than the number of values because counting starts at 0 DCounting starts at 0, not 1. 4 bits hold 0 to 15.
5Largest 8-bit number = 2^8 = 256 E2^4 - 1 = 15
64 bits hold the numbers 1 to 16 Fvalues = 2^n, largest = values - 1

Definitions

2^n - 1

Fill in the Blanks

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

1.
Largest value with n bits = 2^n _ 1
2.
4 bits: 0 to 2^4 - 1 = __
3.
8 bits: 0 to 2^8 - 1 = ___
4.
3 bits hold 2^3 = _ values, so max is 7
5.
The largest 4-bit pattern is ____

Spot the Error

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

Question 1
A bits = 4
B values = 2 * bits
C biggest = values - 1
D print(biggest)
Question 2
A bits = 8
B values = 8 ** 2
C biggest = values - 1
D print(biggest)
Question 3
A biggest = 2 ** 4 + 1
B print(biggest)
C print("4 bits: 0 to", biggest)
Question 4
A bits = 5
B biggest = 2 ** bits
C print(biggest)
Question 5
A lowest = 0
B values = 2 ** 4
C biggest = values
D print(lowest, "to", biggest)

Answer Key

The largest number n bits can hold
Section A: Quick Questions
Q1
A — 15
Q2
B — 255
Q3
B — 2^n - 1
Q4
A — Counting starts at 0, so 8 values run from 0 to 7
Q5
A — 1111
Section B: Match the Pairs
Q1
2^n - 1 → The largest whole number that n bits can hold
Q2
1111 1111 → The biggest 8-bit number, which is 255 in decimal
Q3
4 bits can show 16 different values, but the largest number is 15 → 2^4 - 1 = 15
Q4
The largest number is one less than the number of values because counting starts at 0 → values = 2^n, largest = values - 1
Q5
Largest 8-bit number = 2^8 = 256 → 2^8 is the number of values, not the biggest number. The largest is 2^8 - 1 = 255.
Q6
4 bits hold the numbers 1 to 16 → Counting starts at 0, not 1. 4 bits hold 0 to 15.
Section C: Definitions
Q1
2^n - 1 — The biggest whole number n bits can hold. Counting starts at 0, so n bits give 2^n values and the largest is one less. Example: 4 bits hold 0 to 15 and 8 bits hold 0 to 255.
Section D: Fill in the Blanks
Q1
Largest value with n bits = 2^n - 1
Q2
4 bits: 0 to 2^4 - 1 = 15
Q3
8 bits: 0 to 2^8 - 1 = 255
Q4
3 bits hold 2^3 = 8 values, so max is 7
Q5
The largest 4-bit pattern is 1111
Section E: Spot the Error
Q1
B — The number of values n bits can store is 2 to the power of n, written 2 ** bits. Multiplying (2 * bits) gives 8 instead of 16 values.
Q2
B — The base is 2 and the number of bits is the power, so 8 bits give 2 ** 8 = 256 values. 8 ** 2 swaps them and gives 64.
Q3
A — The biggest number is one less than the number of values, because counting starts at 0. It should be 2 ** 4 - 1 = 15, not +1.
Q4
B — 2 ** bits is how many values 5 bits can store (32), not the biggest value. The biggest is one less, so it needs - 1 to give 31.
Q5
C — 4 bits store 16 values, from 0 up to 15. The biggest number is values - 1, because counting starts at 0 and not at 1.