Encoding a word as 8-bit ASCII binary

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

Encoding a word as 8-bit ASCII binary

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. In 8-bit ASCII encoding, how is each character stored?
A As a single bit
B As one group of 8 bits
2. Which is the 8-bit binary for A (ASCII code 65)?
A 01000001
B 01000010
3. Which is the correct 8-bit ASCII encoding of the word Hi (H = 72, i = 105)?
A 01001000 01101001
B 01101001 01001000
4. How many bits are needed to store the word CAT in 8-bit ASCII?
A 24 bits
B 3 bits
5. What word does 01000010 01000001 decode to? (A = 65, B = 66)
A AB
B BA

Match the Pairs

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

Left columnRight column
1A = 65 = 01000001 AThe letter A has ASCII code 65, which is written as the 8-bit binary group 01000001
201000011 01000001 01000010 B01001000 = 72 = H, 01001001 = 73 = I
3Each character uses one group of 8 bits, so a 3-letter word needs 24 bits in total CThe word CAB stored as three 8-bit groups joined in the same order as the letters
4To decode a binary message, split it into groups of 8 bits and look up each ASCII code DOnly 7 bits are written. The group must be padded with a leading 0 to make 8 bits: 01000010.
5B = 66 = 1000010 E3 characters x 8 bits = 24 bits
6CAB = 01000001 01000011 01000010 FThe groups are in the wrong order. C must come first: 01000011 01000001 01000010.

Definitions

8-bit ASCII encoding

Fill in the Blanks

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

1.
A = 65 = ________
2.
B = __ = 01000010
3.
"CAT" = 3 x 8 = __ bits
4.
01000011 = 67 = _
5.
"AB" = 01000001 ________

Spot the Error

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

Question 1
A word ← "CAB"
B C = 67 = 01000011
C A = 65 = 01000001
D B = 66 = 0100010
E join in order: C, A, B
Question 2
A word ← "HI"
B H = 72 = 01001000
C I = 73 = 01001000
D result ← 0100100001001001
Question 3
A bitsPerCharacter ← 7
B D = 68 = 01000100
C O = 79 = 01001111
D G = 71 = 01000111
Question 4
A word ← "CAT"
B C = 66 = 01000011
C A = 65 = 01000001
D T = 84 = 01010100
Question 5
A bits ← 01001000 01001001
B 01001000 = 72 = H
C 01001001 = 73 = J
D message ← "HI"

Answer Key

Encoding a word as 8-bit ASCII binary
Section A: Quick Questions
Q1
B — As one group of 8 bits
Q2
A — 01000001
Q3
A — 01001000 01101001
Q4
A — 24 bits
Q5
B — BA
Section B: Match the Pairs
Q1
A = 65 = 01000001 → The letter A has ASCII code 65, which is written as the 8-bit binary group 01000001
Q2
01000011 01000001 01000010 → The word CAB stored as three 8-bit groups joined in the same order as the letters
Q3
Each character uses one group of 8 bits, so a 3-letter word needs 24 bits in total → 3 characters x 8 bits = 24 bits
Q4
To decode a binary message, split it into groups of 8 bits and look up each ASCII code → 01001000 = 72 = H, 01001001 = 73 = I
Q5
B = 66 = 1000010 → Only 7 bits are written. The group must be padded with a leading 0 to make 8 bits: 01000010.
Q6
CAB = 01000001 01000011 01000010 → The groups are in the wrong order. C must come first: 01000011 01000001 01000010.
Section C: Definitions
Q1
8-bit ASCII encoding — Look up each letter's ASCII code and write it as an 8-bit binary group, then join the groups in order. Example: A = 65 = 01000001.
Section D: Fill in the Blanks
Q1
A = 65 = 01000001
Q2
B = 66 = 01000010
Q3
"CAT" = 3 x 8 = 24 bits
Q4
01000011 = 67 = C
Q5
"AB" = 01000001 01000010
Section E: Spot the Error
Q1
D — Each character must be stored as a full 8-bit group. 0100010 has only 7 bits. B = 66 = 01000010.
Q2
C — 01001000 is the binary for 72 (H), not 73. The ASCII code 73 for I is 01001001.
Q3
A — Each character is stored as an 8-bit group, so bitsPerCharacter should be 8, not 7.
Q4
B — The ASCII code for C is 67, not 66. 66 is the code for B. The correct line is C = 67 = 01000011.
Q5
C — ASCII code 73 is the letter I, not J. The correct line is 01001001 = 73 = I.