Students extend their understanding of the binary number system by exploring errors that result from overflow and rounding. They make a "flippy do pro" to practice binary-to-decimal number conversions which include fractional place values.
Students will be able to:
This lesson introduces students to the practical aspects of using a binary system to represent numbers in a computing device. Students discover the limitations of creating numbers that are "too big" or "too small" to count. They learn that, while a number system is infinite, the physical representation of numbers requires place values -- which are finite, and limit the ability to represent numbers.
When using this binary representation of numbers, certain values (1, 2, 4, 8, 16, etc.) are seen repeatedly. When written in binary, these values are 1, 10, 100, 1000, 10000, and so on, and so are the incremental place values in this binary number system.
Prompt: Imagine you work at a local store. In the register all you have are nine $10 bills, nine $1 bills, and nine dimes.
Discussion Goal: Today we're going to explore what happens when you don't have the right "places" to store information. This can happen when you try to store very large numbers, very small ones, and everything in-between! The goal of the prompt is to understand the very real problem of making sure that enough place values are available to represent numbers.
At both extremes of the number range, large and small -- and in between numbers -- you are unable to build some numbers because you don't have the place values to do so.
Place students in groups of two. Groups will need one computer per group.
Teaching Tip: Students will tackle the problem of "running out of place values" when counting to bigger and bigger numbers. They will consider an odometer to explore what happens when you add one to the largest number you can represent in a number system.
Prompt: Suppose we have a car odometer. The number in the odometer keeps going up as we drive. What about when the odometer reaches the max value? What happens if we keep driving?
Provide each group with a copy of the Flippy Do Pro Template and scissors.
Do This: Cut and fold your Flippy Do Pro following the guidance on the slide. Fill out all the numbers if they are not already done.
Challenge #1 - Smallest Number: Produce the smallest binary number possible with the Flippy Do Pro.
000000.01and this number has a decimal value of
Challenge #2 - Next Value: Increase the number made in Challenge #1 to the next possible value.
000000.10and this number has a decimal value of
Challenge #3 - Got Quarters?: Make the values 0.25, 0.50, and 0.75 one after another.
000000.11. Note the pattern of changing a place value from 1 to 0 and then "carrying" the one.
Challenge #4 - Can't Make Change: Make all the fractional possible in binary using the Flippy Do Pro.
Challenge #5 - Largest Number: What is the largest number (in decimal) you can make with the Flippy Do Pro?
Challenge #6 - How Much Pie: Challenge 6 contains a number of pie charts. Each chart has a single colored slice, representing a piece of pie. Students use a Flippy Do Pro to determine how much pie is left at the end of dessert. With each slide, allow time for students to decide how to represent the amount of pie left as a binary number, then convert that to decimal and write it down in the journal. In this challenge it is expected that students will estimate and do some rounding when determining how much pie is left.
Do This: For each pie chart, students should:
Do This: Add all the decimal numbers together. Compare with a partner and discuss.
Prompt: Why is it a problem for a computer if your answers are different than others?
Discussion Goal: Computers rely on precision. Think of a calculator. We depend on 1+1 always equaling 2. Rounding is necessary because of the limits of bits, but can lead to errors.
As students have seen, you can make "any number" in your head, but the tool you use to represent a number has limitations. It has a fixed number of place values it can show. An odometer keeps running after you move beyond its upper limit, but the largest place values cannot be displayed due to overflow error.
In the Flippy Do Pro, you assigned some of the bits to fractions, but you saw that you still couldn't represent certain "small" numbers -- you could only show a number that was "close to" your target number. This is roundoff error, an error that occurs when bit arrangements can't represent numbers as intended.
Ultimately, regardless of the size of our odometer or Flippy Do Pro, and how many bits we add to them, there's going to be numbers that are too large, too small, or "in-between" the values we want to represent.
Journal: Students add to their journals the definitions for: Overflow Error and Round-off Error.
Question: Modern car odometers record up to a million miles driven. What happens to the odometer reading when a car drives beyond its maximum reading?
Question: When using bits to represent fractions of a number, can you create all possible fractions? Why or why not?