Lesson 6: Representing Text
Group Problem Solving
Overview
In this lesson, students create a system for representing text using only numbers while communicating with each other. They are only allowed to send numbers back-and-forth, so they must create a system to translate between number and character. At the end of the main activity they briefly review the ASCII system for representing text. The wrap up discussion emphasizes how all of the concepts thus far have ‘built’ on each other and introduces the concept of abstraction to describe this progression.
Purpose
After this lesson students will understand the ways the most common types of information, text and numbers, are stored using binary. More importantly they should understand the challenges or principles that led to the creation of these systems and that these systems are somewhat arbitrarily created to solve a shared problem. They work not because there was "one right answer" but because many people agreed to use them. The wrap up discussion begins to explore the concept of abstraction. This is a challenging concept to understand and one that students will return to many times throughout the course. In this context, we emphasize how common it is to send text messages to each other yet these messages rely on many smaller layers (like binary numbers and electrical signals) to truly function correctly.
Agenda
Lesson Modifications
Warm Up (5 mins)
Activity (35 mins)
Wrap Up (5 mins)
View on Code Studio
Objectives
Students will be able to:
- Develop a system for using numbers to represent text
- Explain how bits are grouped to represent abstractions like numbers and text.
- Describe the challenges in representing text when using a fixed number of bits for each character
Preparation
- Decide how you will distribute challenge phrases to students
- Access to journals, paper, or other places that students can write down systems for the main activity.
- Optionally print copies of ASCII Reference Sheet or prepare to project it
Links
Heads Up! Please make a copy of any documents you plan to share with students.
For the Teachers
- CSP Unit 1 - Digital Information - Presentation
For the Students
Teaching Guide
Lesson Modifications
Attention, teachers! If you are teaching virtually or in a socially-distanced classroom, please read the full lesson plan below, then click here to access the modifications.
Warm Up (5 mins)
Discussion Goal
Goal: Each item in the list represents a non-denominational holiday - New Years Day, Valentine’s Day, Independence Day, and Halloween. Students should be initially puzzled by what this list represents - it may be helpful to point out the format of the list (two numbers) and that this list happens throughout the year.
Alternate Discussion: This example could be adapted to fit your classroom or school environment in order to better help your students predict what the list represents. For example: a list of room numbers in your school that students can relate to, or a list of street addresses that have meaning to students. If you decide to adapt this example, make sure it still addresses the larger concept that this warm-up introduces: that numbers can be used to represent different types of information.
Remarks
This list secretly represents four things we experience every year. This list is not complete - there are others that we could add to it.
Prompt: Brainstorm with your neighbor what you think this list represents. When you think you have an idea, come up with another item to add to this list and be ready to explain why it belongs.
- 1 1
- 2 14
- 7 4
- 10 31
Activity (35 mins)
Remarks
In our warm-up, we used numbers to represent certain type of information. In today's activity, we will also use numbers to represent something that computers use pretty frequently: text messages.
Group: Place students in pairs. Assign students to "Partner A" or "Partner B".
Distribute: Give each pair a few sticky notes.
Teaching Tip
Most likely students will arrive at a system where they assigned each character to a corresponding number.
For example: a = 1, b = 2
If students are struggling, remind them to consider each character individually rather than the whole word at once.
Do This: Look at the samples on the screen. Using only numbers, you will need to communicate these samples to a partner. No letters or other characters (including spaces) allowed! Come up with a system that allows you to do this.
Teaching Tip
The four challenges are designed to test the limits of the students' systems. For each challenge, after one partner has put their head down, click through to reveal the challenge to the the other partner.
After the partner has translated the message to numbers, they hand the sticky note to the other partner and put their head down. The other partner translates back to English.
After the challenge is done, give students a few minutes to update their systems as needed.
Be on the lookout for cheats in a system - students cannot use spaces (aside from between two numbers to differentiate that where one number stops and the other starts) or symbols - only numbers one after the other.
Challenge #1 - Spaces
- Partner A: Heads down!
- Partner B: On a sticky note, use your system to write the message: oh no
Do This:
- Partner B: Heads Up! Translate the message on the sticky note using your system.
- Partner A: Heads down!
Do This: Heads up! Check your answers. After students have checked, allow them time to update their system as needed.
Challenge #2 - Punctuation
Do This:
- Partner A: Heads down!
- Partner B: On a sticky note, use your system to write the message: Great!
Do This:
- Partner A: Heads down!
- Partner B: Heads Up! Translate the message on the sticky note using your system.
Do This: Heads up! Check your answers. After students have checked, allow them time to update their system as needed
Challenge #3 - Capitals and Numbers
Do This:
- Partner A: Heads down!
- Partner B: On a sticky note, use your system to write the message: Free at 5?
Do This:
- Partner A: Heads down!
- Partner B: Heads Up! Translate the message on the sticky note using your system.
Do This: Heads up! Check your answers. After students have checked, allow them time to update their system as needed
Challenge #4 - Review all symbols
!
Do This:- Partner A: Heads down!
- Partner B: On a sticky note, use your system to write the message: Cya 2nite!
Do This:
- Partner A: Heads down!
- Partner B: Heads Up! Translate the message on the sticky note using your system.
Do This: Heads up! Check your answers. After students have checked, allow them time to update their system as needed.
Discussion Goal
- There's many possible systems and there's usually not a "right" one so long as everyone agrees.
- Adding more possibilities increases the risk of having too many characters to represent and not enough bits to do it. This is a practical example of the overflow and rounding issues from the previous lesson.
Prompt: Find another group. Discuss with them the following prompts
- Compare your systems. How are they the same? How are they different?
- What's the minimum number of bits each of your system would need per character? How do you know?
- Hint: Convert your largest number in your system into binary. How many bits does this number require?
Discuss: Have groups compare with each other, then move to a full group discussion. Ask groups to share out what they discussed about their systems.
Introduce ASCII
Remarks
You just invented your own scheme for representing text with numbers. Given we use text on our phones and computers all the time, we should assume there is a standard representation for most of the symbols you can type on an American keyboard. Today we're going to be looking at one called or ASCII (pronounced: “Ask-ee”) or the American Standard Code for Information Interchange
Teaching Tip
How familiar with ASCII?: Students should be aware that ASCII exists and see how its development mirrors their own experiences in the previous activity, but they are not required to memorize the ASCII table. If your students are able to quickly recognize the point of the ASCII table feel free to move on to the wrap up.
Distribute: Hand out copies of the ASCII Reference Sheet or project it. Quickly read the overview text at the beginning of the sheet.
Prompt: Compare ASCII to the system you developed.
- What's the same as the systems you created?
- What's different?
- What is most interesting or surprising about this system?
Discuss: Briefly discuss these prompts as a class. At this point the main features of the system should be familiar but use this discussion to reinforce previous points.
Wrap Up (5 mins)
Discussion Goal
Answers:
- Students should identify they were trying to send text messages.
- Students were using decimal numbers instead of binary numbers or AB patterns
Remarks
Representing text is an example of abstraction, which is when we create simplified representations of something more complex. This lets us hide the details and instead focus on problems at a higher level.
- What problem were we trying to solve today?
- What detail from the last few lessons was hidden or out of focus?
Remarks
Sending text messages is an example of abstraction. For a computer, each character is really just a number, which itself is really a binary number. It all comes back to zeroes and ones!
Discussion Goal
Student answers will vary. Examples: driving a car, turning on the lights in your room, riding in an elevator, etc.
Prompt: What is another example of an abstraction in your everyday life? Something where you don’t completely understand how it works but you can still use it with confidence?
Assessment: Check For Understanding
Check For Understanding Question(s) and solutions can be found in each lesson on Code Studio. These questions can be used for an exit ticket.
Question: "The binary pattern 01000001
represents the number 65." Write a brief response explaining whether or not you believe this statement is always true. Explain your reasoning.
- Lesson Overview
- Student Overview
Student Instructions
Student Instructions
In 50 words or less, describe the concept of a number system.
Why are rules required for a number system to be useful?
Standards Alignment
View full course alignment
CSTA K-12 Computer Science Standards (2017)
AP - Algorithms & Programming
- 3A-AP-21 - Evaluate and refine computational artifacts to make them more usable and accessible.
DA - Data & Analysis
- 3A-DA-09 - Translate between different bit representations of real-world phenomena, such as characters, numbers, and images.
CSP2021
DAT-1 - The way that the computer represents data is different from the way that the data are interpreted and displayed for the user
DAT-1.A - Explain how data can be represented using bits.
- DAT-1.A.5 - Abstraction is the process of reducing complexity by focusing on the main idea. By hiding details irrelevant to the question at hand and bringing together related and useful details, abstraction reduces complexity and allows one to focus on the idea.
- DAT-1.A.6 - Bits are grouped to represent abstractions. These abstractions include, but are not limited to, numbers, characters, and color.
- DAT-1.A.7 - The same sequence of bits may represent different types of data in different contexts.