Contributed by Jesse Lubinski
Irvington High School
Irvington, New York
Adapted from material by Jeff Chertok.
This is a great introductory lesson to binary numbers. Distribute a copy of the circles image below to each student in the class. You can begin by telling the students that in addition to being a teacher you are also a mind reader. To prove it, you will perform a demonstration of your "magic."
How to Perform the Trick:
- Ask a student to pick a number between 1 and 31, inclusive. Make sure the student does not say out loud the number they have chosen.
- The key to performing this trick is to memorize the top number of each circle (4 in the upper left, 2 in the upper right, 16 in the center, 1 in the lower left, 8 in the lower right).
- Beginning with the first circle (the one in the upper left), ask the student if the number they are thinking of is in the circle. You are going to begin keeping a running total. If the student says that the number they are thinking of is in the circle you are asking about, you will add the top number of that circle to the total.
- Repeat step 3 for all five of the circles.
- After you have checked all five circles, the total you have accumulated will be the number the student has been thinking of. Casually tell the student what their number is and watch the students react in awe. Well, not awe exactly—but they like the trick.
How the Trick Works:
The trick is based on binary numbers. Binary numbers are numbers in which each digit is represented by only two digits, 0 or 1. In computing, they are used by computers for memory, storage, processing, communications, or any other place where two different states are used. The 0 and 1 values are sometimes called "low" and "high," respectively.
The number system we normally use is written in Base 10, meaning that each digit is a power of ten. For instance, the number 149 has a 1 in the hundreds (102) place, a 4 in the tens (101) place, and a 9 in the ones (100) place. It can be viewed as:
Another way of thinking about Base 10 is that we have ten choices for each digit. Since we know that binary numbers have only two choices, 0 or 1, we can call them Base 2 numbers. Therefore, each place value would be a power of two. So the number 149 would be:
Look at the columns with the 1s. They are 27 (128), 24 (16), 22 (4), and 20 (1). When we add these together (128 + 16 + 4 + 1) we get 149.
If we take a look at the numbers from the trick (1 through 31, inclusive) in binary form, we can see the following:
Notice that each power of two has 16 numbers that have a 1 for that particular bit. The way the trick is formed is by treating each bit (or power of two) as one of the circles in the trick. This means that each circle will have 16 numbers in them. If a number has a 1 for that bit, it is added to the circle. So according to our chart, the number 31 will appear in all five circles. The number 20 will appear in two circles, 24 (16) and 22 (4), which added together equals 20. The key is that the top number of each circle is the actual value of that place value. If the student correctly identifies all of the circles in which a number appears, adding the top numbers (place values) will help you correctly identify the number.
Note that the different fonts and sizes of the numbers in the circles do not actually matter. They are there to simply add some confusion to those who are trying to figure the trick out since they often mistake the sizes of the numbers to have meaning.
To take a look at an algorithm, along with pseudocode, which helps explain how to convert decimal to binary and vice versa, visit the Binary System Web site.