Lesson 3: ASCII and Binary Representation
45 minutes
Overview
This lesson is an opportunity to make some real-world connections from the previous lesson and review some of the concepts students saw in that activity. Students are formally introduced to the concept of binary, learn what a bit of information is, and get practice using a binary system and ASCII, a system for encoding information. At the beginning of the lesson, the teacher introduces the fact that computers must represent information using either "on" or "off". Then students are introduced to the ASCII system for representing text using binary symbols. Students practice using this system before encoding their own message using ASCII. At the end of the lesson, a debrief conversation helps synthesize the key learning objectives of the activity.
Question of the Day: What system do computers use to represent letters and words?
Standards
DA - Data & Analysis
- 2-DA-07 - Represent data using multiple encoding schemes.
Agenda
Objectives
Students will be able to:
- Define a binary system as one that uses just two possible states to represent information
- Use the ASCII system to encode and decode text information in binary
Preparation
- Print copies of the activity guide - 1 per student
- Print copies of the ASCII text resource - 1 for each pair of students
- Check the "Teacher's Lounge" forum for verified teachers to find additional strategies or resources shared by fellow teachers
- If you are teaching virtually, consider checking our Virtual Lesson Modifications
Links
Heads Up! Please make a copy of any documents you plan to share with students.
For the teachers
- ASCII and Binary Representation - Slides
For the students
- ASCII Challenges - Activity Guide
- ASCII Text - Resource
Vocabulary
- ASCII - a popular system for representing text in binary
- Binary System - a way of representing information using only two options
- Bit - a single piece of binary information
Teaching Guide
Warm Up (5 minutes)
Journal
Prompt: Yesterday’s activity used six different animal symbols to represent letters. Do you think we could do the same activity with only two symbols instead? Would that change the patterns you used yesterday?
Discuss: Have students discuss their answers with a neighbor but don’t worry about sharing out as a full group. Instead, begin transitioning to the main activity.
Jump to the Activity: This introductory prompt is important to justify the patterns students will see on the activity guide. Otherwise, however, most of the discussion in this lesson can happen after the activity.
Remarks
Modern computers are electronic devices filled with lots of tiny wires. These wires carry electricity and at any moment a wire can be on or off. In fact all the information you've ever used on a computer like documents, videos, and pictures, eventually need to be translated down into these "on" and "off" signals. This is a really big challenge and it's one we're going to explore for the next few lessons.
Question of the Day: What system do computers use to represent letters and words?
Activity (35 minutes)
Group: Place students in pairs
Distribute: one copy of the ASCII Text resource per pair of students, and copies of the ASCII Challenges activity guide to each individual student
ASCII Text Resource
ASCII Text: Read this section of the resource as a class. Help students with the pronunciation of ASCII (ask-ee). After reading both paragraphs, display the vocabulary for the class to see.
Vocabulary:
- Binary System: a way of representing information using only two options
- ASCII: a popular system for representing text in binary
Display: Review the ASCII table with students, emphasizing that this table is one way to solve the problem introduced in the warm-up journal prompt. Inform students that ASCII is the system that likely every computer they've ever used uses to represent letters. Once the table has been discussed, have students use the table to solve the challenges in the activity guide.
ASCII Challenges Activity Guide
Display: Have students decode the three messages in pairs, checking answers with each other as they work.
Circulate: Be on the lookout for strategies pairs use to decode the messages. Encourage pairs to check their answers with you before continuing to the back of the activity guide.
Why Not Split the Symbols: When sending information with electricity, there's no way to put a "space" between signals. At any moment you're either sending electricity or you're not. This is the primary reason why characters are an agreed-upon length, in this case 7 bits long.
Make Your Own: Have students design their own simple binary system by designing what the "On" symbol and the "Off" symbol will be. Then have them write their messages using ASCII, trade with a partner, and decode. If there's time, have students exchange with multiple groups.
Students should be able to use their own binary system to create their own encoded messages.
The students' messages should be encoded and decoded correctly on the activity guide. Check to make sure students are only using two elements in the encoding challenge, and that there are no spaces in the encoded message.
Wrap Up (5 minutes)
Share-out: Ask students to share the symbols they used for their binary system when creating their own messages. Have several students share their ideas.
Remarks
All of these are valid binary systems, where we can represent letters with just two pieces of information. Computers have their own binary system - they use 0’s and 1’s to represent information. This is why you may have heard that computer science is all “0’s and 1’s”. When you have a single 0 or 1, that is called one bit of information.

Ignore Numbers for Now: The ASCII system as presented here is just a system for representing characters with patterns of bits. In reality, the characters are often associated with the binary number system, which is presented in a later lesson. If this comes up, acknowledge there's lots of extra information to know about that we’ll continue to explore in later lessons.
On-Off Symbol: Students may have seen this on-off icon before. It's just a 0 and a 1 combined!
Vocabulary:
- Bit: a single piece of binary information
Remarks
We saw bits of information represented in many ways today like dogs/cats or apples/bananas. These are all equally valid ways of representing Ons and Offs. Going forward we'll use 1's and 0's, but this just means On and Off.
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.