Bits and the binary digits 0 and 1

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

Bits and the binary digits 0 and 1

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. A bit can be which of these?
A Either 0 or 1
B Any number from 0 to 9
2. Which switch position matches the bit 1?
A Off
B On
3. Which switch position matches the bit 0?
A Off
B On
4. Which one is a single bit?
A 7
B 1
5. How many bits are in a byte?
A 8 bits
B 2 bits

Match the Pairs

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

Left columnRight column
11 AA byte has 8 bits, but this has only 4. It needs 8 digits, like 01100110.
20 BA bit that is off
3A byte is a group of 8 bits CA bit can only be 0 or 1, so 2 is not a valid bit. It should be bit = 0 or bit = 1.
4A single bit can only be 0 or 1 D01101001
5bit = 2 EA bit that is on
6byte = 0110 Fbit = 1

Definitions

bit

Fill in the Blanks

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

1.
A ___ is either 0 or 1
2.
1 byte = _ bits
3.
0 means off, _ means on
4.
0 means ___, 1 means on
5.
8 bits make 1 ____

Spot the Error

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

Question 1
A bit = 1
B if bit == 1:
C print("off")
D else:
E print("off")
Question 2
A bits = [0, 1, 2, 0]
B for b in bits:
C print(b)
Question 3
A size = 8
B byte = [1,0,1,1,0,0,1]
C print(len(byte) == size)
Question 4
A bits = [1, 0, 1]
B total = 0
C for b in bits:
D total = total + bits
Question 5
A bytes = 2
B bits_per_byte = 8
C bits = bytes * bits_per_byte
D print("Total bits:" bits)

Answer Key

Bits and the binary digits 0 and 1
Section A: Quick Questions
Q1
A — Either 0 or 1
Q2
B — On
Q3
A — Off
Q4
B — 1
Q5
A — 8 bits
Section B: Match the Pairs
Q1
1 → A bit that is on
Q2
0 → A bit that is off
Q3
A byte is a group of 8 bits → 01101001
Q4
A single bit can only be 0 or 1 → bit = 1
Q5
bit = 2 → A bit can only be 0 or 1, so 2 is not a valid bit. It should be bit = 0 or bit = 1.
Q6
byte = 0110 → A byte has 8 bits, but this has only 4. It needs 8 digits, like 01100110.
Section C: Definitions
Q1
bit — A bit is a single binary digit that is either 0 or 1, like a switch that is off (0) or on (1). A group of 8 bits is called a byte.
Section D: Fill in the Blanks
Q1
A bit is either 0 or 1
Q2
1 byte = 8 bits
Q3
0 means off, 1 means on
Q4
0 means off, 1 means on
Q5
8 bits make 1 byte
Section E: Spot the Error
Q1
C — A bit of 1 means on, so when bit == 1 the program should print "on", not "off".
Q2
A — A bit can only be 0 or 1. The 2 is not a bit, so it should be bits = [0, 1, 1, 0].
Q3
B — A byte is a group of 8 bits. This list only has 7 bits, so one more bit is needed to make a byte.
Q4
D — Inside the loop we add one bit at a time to count the ones. It should be total = total + b, not the whole list.
Q5
D — A comma is missing between the text and the variable. It should be print("Total bits:", bits).