Lesson 4: Binary Numbers
45 minutes
Overview
In this lesson, students will practice representing numbers in binary (base 2), transitioning from the circle-square representations they made in the last lesson. Students will create and use a "Flippy Do", a manipulative which helps students convert between binary (base 2) and decimal (base 10) numbers. They will practice converting numbers and explore the concept of place value in the context of binary numbers.
Standards
DAT-1 - The way that the computer represents data is different from the way that the data are interpreted and displayed for the user. Programs are used to translate data into a representation that is more easily understood by people.
DAT-1.A - Explain how data can be represented using bits.
- DAT-1.A.2 - Computing devices represent data digitally, meaning that the lowest-level components of any value are bits.
- DAT-1.A.3 - Bit is shorthand for binary digit and is either 0 or 1.
- DAT-1.A.4 - A byte is 8 bits.
DAT-1.C - For binary numbers: a. Calculate the binary (base 2) equivalent of a positive integer (base 10) and vice versa. b. Compare and order binary numbers.
- DAT-1.C.1 - Number bases, including binary and decimal, are used to represent data.
- DAT-1.C.2 - Binary (base 2) uses only combinations of the digits zero and one.
- DAT-1.C.3 - Decimal (base 10) uses only combinations of the digits 0 – 9.
- DAT-1.C.4 - As with decimal, a digit’s position in the binary sequence determines its numeric value. The numeric value is equal to the bit’s value (0 or 1) multiplied by the place value of its position.
- DAT-1.C.5 - The place value of each position is determined by the base raised to the power of the position. Positions are numbered starting at the rightmost position with 0 and increasing by 1 for each subsequent position to the left.
DA - Data & Analysis
- 3A-DA-09 - Translate between different bit representations of real-world phenomena, such as characters, numbers, and images.
Agenda
Objectives
Students will be able to:
- Explain how the position of each binary digit determines its place value and numeric value
- Represent binary numbers using combinations of decimal (base 10) digits 0-9
- Represent decimal numbers using combinations of binary (base 2) digits 0 and 1
Preparation
- Scissors (many pairs)
- Printed copies of Flippy Do
- KEY U1L4 Flippy Do Pt 1
- 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
- Binary Numbers - Slides
- U1 L4 How to Make a FlippyDo - Teacher Guide
For the students
- Flippy Do
- U1 L4 Flippy Do Pt 1 - Activity Guide - Activity Guide
Vocabulary
- Binary - A way of representing information using only two options
- Bit - A contraction of "Binary Digit"; the single unit of information in a computer, typically represented as a 0 or 1
- Byte - 8 bits
- Decimal - A way of representing information using ten options
Teaching Guide
Warm Up (5 minutes)
Discuss: Yesterday, you created your own number system using circles and squares. What can we communicate using only two symbols? Is there a limit?
Students should quietly write an answer, then share with a partner, then discuss with the whole class.
Discussion Goal: In previous lessons, students represented information using two options. This is a quick-thinking question to tap into students’ prior knowledge and experiences. Once students have mentioned a few of the points below, they can move on.
- The answer to a yes/no or true/false question
- Flipping a switch on/off
- Combinations of yes/no answers by using multiple symbols in a row
- We can keep adding more of the same symbols, so the only limit is how much space we have to write or store those symbols
Use the Retrieve-Pair-Share strategy to facilitate this discussion by directing students to write down their thoughts and ideas first, then pair up students to compare their answers and expand their notes. This allows time for individual processing and idea generation before sharing thoughts with others. Ask students to share the ideas they discussed with their partners as a class.
For more ideas on how to adapt this strategy to fit the needs of your class, check out the CSP Guide to Classroom Discussions
Activity (35 minutes)
Display: Use the activity slides for this lesson to introduce students to the binary number system. Use the presenter notes as a guide to explaining how the shapes we used in the previous lesson relate to binary numbers. These slides use a lot of animations.
Look for this symbol on the slides to show when animation plays when presenting the slides: . Make sure to preview the slides before class.
Slides | Speaker Notes |
---|---|
Say: Today we are going to explore how Binary Numbers work. | |
Say: With only one place value, we only have two possible patterns: circle or square. ![]() Say: I started with circle, but we could have easily started with square instead. | |
![]() Say: With two place values, we can make two sets of the previous patterns. Then, insert circles in front of the first set and squares in front of the second set. This makes four possible patterns. | |
![]() Say: For three place value patterns, we can make two copies of the two place value patterns. Then, just like we did before, fill in the first set with circles in front and the second set with squares in front. This makes 8 arrangements. Note: Computer scientists like to start counting at 0! | |
Say: Instead of two shapes, what if we had 10 shapes? | |
![]() Say: We could use more geometric shapes, or we could use letters, but the shapes we are used to are the numbers 0 through 9. | |
Say: With two places, we have one hundred 2-shape patterns. These are the numbers 00 through 99. ![]() | |
Say: What happens when we count up to the last shape? Do This: Quick quiz! What comes after this number? | |
![]() | Say: 100! When we run up to the last shape, 9, we roll over back to 0 and add one in the next place to the left. This is the place value that we have used all our lives. |
Say: Where is this heading? ![]() | |
Say: Binary is a number system with two shapes. ![]() | |
![]() Say: Instead of shapes, we use 0's and 1's. In this example, each pattern maps to a decimal number from 0 to 7. | |
Say: For today's activity, you will be creating your own Flippy Do. This is a tool that will allow you to quickly and easily translate between the decimal number base we are used to as humans and the binary number base that computers use. Distribute: Hand out the Flippy Do templates - one per student. Do This: Lead students through completing their Flippy Do's using the slide as a guide. | |
Say: Each place value represents one "bit" which is short for "binary digit". A binary digit can be a zero or a one. Your flippy do has eight "bits". ![]() Say: Together, eight place values, or "bits", makes up one "byte". Since computers represent information digitally, the lowest level components of information are bits. | |
Do This: Use your Flippy Do to try out these six problems. Note: It may be necessary to demonstrate how values can be calculated by flipping up a “1” for each value required to arrive at the sum of values equal to the decimal number. For example, To convert the decimal number 10, I would flip up a one in the 8's position, because eight can fit in 10 (The next bit to the left is 16, which is too big). Then I have 2 left. I flip up a one in the 2's position. This gives me the binary number "1010", which means 10 in decimal. If students are having a difficult time understanding the rules of the system, remind them of the concept of place value and relate to base 10. | |
Say: Let's continue to practice with our own two number bases, decimal and binary. After you finish each of the four parts of the Activity Guide, I want you to check your work with your partner. Feel free to use your Flippy Do as you work. Distribute: Activity Guide Note: Encourage students to use their Flippy Do as a resource.
Note: As you circulate, take an opportunity to be a Lead Learner. Help students discover the items below using the suggested questions:
|
Peer Instruction
Question: Each time we add another bit, what happens to the amount of numbers we can make?
Question: Two schools are merging and to adapt to the increased size of the student body, the school is changing its system for keeping track of all student IDs from a system that uses 4-bit binary numbers to one that uses 8-bit binary numbers (AKA 1 byte). Which of the following best describes what effect this change will have?
Use these questions to help formatively assess your students. You may choose to have them complete these questions before or after working on the Activity Guide. You can use the flowchart below to help use the data you get from these questions to inform your instruction.
For more information, check out the CSP Guide to Assessment.
Wrap Up (5 minutes)
Remarks
It's important to know the differences between binary and decimal number systems. As a review, the decimal number system is base-10. There are ten different symbols used to represent numbers (0-9). The binary numbers system is base-2. There are two different symbols used to represent numbers (0-1). Using our Flippy Do, we can convert between Binary and Decimal number systems.While it is easier for humans to use the decimal number system in our everyday lives, we will see later in this unit how electrical signals inside computers can be best represented by using the the binary number system.
Number Bases:
Number bases help us express data and reason about quantities. With ten digits on our hands and feet, the decimal (base 10) number base was natural for humans to develop. The ten symbols we use for this number base are the digits 0-9. For a computer, however, it makes more sense that data be represented in binary (base 2), as this can easily be interpreted with electrical switches set to two states: ON or OFF. The two symbols we use for this number base are the digits 0 and 1.
Both number bases take advantage of the concept of place value. In decimal, numbers are composed of powers of 10, increasing in value from right to left. Binary is similar, however we use powers of 2 (1, 2, 4, 8, 16, etc.). Expressed in binary, these values are 1, 10, 100, 1000, 10000, and so on. These make up the incremental place values in the binary number system.
Why Binary?
Students will see in a later lesson how computers use binary numbers as a representation of electrical signals on a wire. The wire is always set to one of two different options: on or off. Off can be reprsented with a 0 and on with a 1.
Vocabulary Canvas: Use the slides to walk your class through how to add to the Vocabulary Canvas pages in their journals. The slides include examples taken from this lesson.
Vocabulary Canvas: You may choose to add your own examples to the slides. The image below shows the example of a Vocabulary Canvas provided in the lesson slides. Also, you can find definitions and graphics for the vocabulary words in the hidden slides at the end of the lesson slides, if you'd like to use those with your students.
Journal: Give students time to add the vocab words to their journals.
You may choose to check journals after this lesson as a way to help assess what students learned and what needs to be clarified. Some misconceptions can be visually clarified using the Binary Odometer Widget in the next lesson.
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: How many bits would be needed to count all of the students in class today?
Question: What are the similarities and differences between the binary and decimal systems?
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.