Pin it!
Google Plus

Birthdays and the Binary System

  • Lesson
Number and Operations
Location: Unknown

This lesson is a collection of three activities, all of which revolve around patterns and place value in the binary system. Grades 5‑8 students are drawn into the mathematics by the "magical" ability to guess an unknown number and by the use of birthdays, something they find very relevant. This lesson plan is adapted from the September 1997 edition of Mathematics Teaching in the Middle School.

The "Green Machine" 

For students to discover the mechanics of the mathematics, start off with the simplest form of the birthday-guessing devices, which is the "green machine." This activity involves a green-construction-paper packet containing an assortment of numbers from 1 to 31 on each page. The "magician" shows each of the five pages, asks whether the secret birthday appears on that page, and receives a "yes" or "no" response. After the fifth card, the magician has gained enough information to announce the mystery date. Although the students want to ascribe the process to advanced memorization skills, they will find that patterns of numbers promise to be a more workable strategy. More important, this revelation encourages them to suspect that they may have the skills to guess a hidden birth date.

The students examine individual cards in the packet to identify any numerical patterns.

They begin to recognize and talk about patterns by noting such characteristics as that all numbers on card 1 are odd; that the numbers increase by 4 in both columns on cards 1 and 2; or that card 5 starts at the number 16 and counts up by 1.


Card 1
  1     3 
5 7
9 11
13 15
17 19
21 23
25 27
29 31
Card 2
  2     3 
6 7
10 11
14 15
18 19
22 23
26 27
30 31
Card 3
  4     5 
6 7
12 13
14 15
20 21
22 23
28 29
30 31


Card 4
  8     9 
10 11
12 13
14 15
24 25
26 27
28 29
30 31
Card 5
 16    17 
18 19
20 21
22 23
24 25
26 27
28 29
30 31

The class works on detecting patterns for each card as well as synthesizing individual regularities and arrangements into rules that encompass all the cards. Then they might be asked to work backward and focus on how the activity is actually done, examining the relationship between the yes-no responses and the outcome. If they do not come to the conclusion themselves, a prompt that the yes responses are a key to the ability to guess the birthday might supply a clue. Using several sample numbers, one at a time, students isolate the cards that have generated an answer of yes for a particular secret number and inspect them to see if any patterns can be discerned. As students collect data mentally and search for relationships between the numbers on the cards and the final results, they develop possible rules that describe what is occurring. Each rule suggested is tested to examine whether it works with other numbers.

Eventually one or more students notice that adding the top-leftmost number of each yes card generates the secret number. Therefore, to guess the birthday, when the audience says yes to a card, the magician mentally stores the number appearing in the upper-left corner. As additional cards are shown, from those receiving a yes answer the magician continues to add the top-leftmost numbers mentally and then announces the sum, which is the secret number. Students can test this procedure for several different birthday numbers to check the validity of the solution. Of course, students find that some memorization skills are used, but not to the degree that they originally imagined, as they need remember only one number, the accumulated sum, as each new card is considered. They discover that through the use of mathematics, a seemingly magical ability is within their grasp.

You may use the following link to help you create your own set of Green Machine cards.

pdficon  Instructions for creating the Green Machine cards 

"Sorting Cards" 

The next birthday-guessing activity involves a set of four-inch-by-six-inch index cards with holes punched across the top. The students examine an overhead-projector display consisting of five boxes filled with various combinations of the numbers from 1 to 31 and report whether a particular student's birthday is present. The magician responds to their yes and no answers by placing a large open paper clip, or other thin metal rod, into the holes and sorting the cards. The response regarding the last box of numbers on the display sheet and the last sort leave one index card, which reveals the student's birthday.

This card-sorting activity works very much in the same way as the "green machine," but it recognizes the yes-no values through a system of punched holes across the top of the index cards to symbolize the numbers 1 through 31. Each hole represents a place-value column of the binary system, that is, 1, 2, 4, 8, and 16.

937 fig 5

Each student needs thirty-one index cards, which should be numbered from 1 through 31 and identically punched with five holes along the top. Then the cut on some of the holes is extended to match the value of the particular number. If the number contains a value of 1 in any given binary place value, the hole is left intact. If the value in that place is 0, the hole is opened with a full cut so that the paper clip will pass through.

For example, on card number 7, a value of 1 appears in the 1, 2, and 4 columns (1 + 2 + 4 = 7), and a value of 0 appears in the 8 and 16 columns.

937 fig 6

Therefore, the 1, 2, and 4 holes are left intact and the 8 and 16 holes are cut through. Readers will notice that the number sheet used on the overhead projector with this activity is actually a rearrangement of the numbers on the five cards incorporated in the "green machine" activity.

937 fig 7

To guess the secret number correctly, the person handling the cards begins by asking whether the secret number is in the box labeled I on the overhead transparency. The first box on the transparency corresponds with the hole in the upper-right corner on the cards. If the response is yes, the cards that are lifted by the open paper clip are kept for further sorting with the remaining questions. The other cards are put aside. If the response is no, the cards that fall out of the sort are kept and the cards that are lifted are put aside. The sorts continue accordingly, moving to each hole in order from right to left, as the students respond to boxes II-V on the transparency.

The sorting cards are similar to keypunched cards used with early computer systems. The keypunched holes represented binary data that were read by a machine. Instead of sorting the cards through the cut-versus-uncut-hole process, the keypunched holes enabled electrical or mechanical impulses to be sent through, signaling specific information for the computer to interpret. Computers still operate on the binary principle, but current software conceals this "machine language" from most users.

The "sorting cards" also more distinctly represent the complete translation of a base-ten number to a base-two number. For example, 7 in base ten is represented by 1112, and the number 4 in base ten is represented by 1002. The value of working in base two comes not so much from the content knowledge acquired or understanding the working of the base-two-place-value system but from the process of encoding and decoding information; understanding, clarifying, and using number patterns; and developing a better understanding of place value.

"Window Cards" 

This activity involves a set of posterboard cards with small windows.

937 fig 8a


937 fig 8b

The windows are shown in the figures by the shaded spaces that are marked with an X. Each card contains two columns of numbers. Again, through a yes or no response from the class as to the appearance of a birthday on the card and a strategic placement of the cards, the final card reveals the student's birthday through a window created by the other cards. If an observer is watching the cards in use when a participant selects the secret number 11, the following interactions would be seen. The magician holds up the first card as the participant looks for the number 11. As the participant examines card 1 and sees the number 11, he or she responds yes, so the card is placed faceup with the numbers right-side up (a). Card 2 also receives a yes response and is placed on top of card 1, again faceup with the numbers right-side up (b). Because the number 11 is not on card 3, it receives a no response and is placed faceup on top of card 2, but with the numbers upside down (c). Card 4 receives a yes response and is placed on top of card 3 faceup with the numbers right-side up (d). Card 5 is set aside. Card 6 receives a yes and is placed on top of card 4 facedown and upright (e). Finally the entire stack is picked up, made flush, and held so that the face of the bottom card in the stack is shown to the participant. The secret number, 11, is revealed in the window (f). 

937 fig 9

The "window cards" carry out the same process of elimination as the "sorting cards" except that the filtering is done through spatial patterns. Each time the students report a yes or no response, the different slots in the cards are turned and thereby eliminate or include the appropriate numbers on card 6 in the final position. The placement of the slots matches patterns related to the binary system as discussed subsequently and displayed below.

937 fig 10 

On the one hand, when a response to a card is a yes, the card should be placed faceup with the numbers right-side up for the magician to read. On the other hand, when a response to a card is no, the card should be placed faceup with the numbers in a completely upside-down position if the magician tried to read them. These cards are stacked one by one in the appropriate direction as the activity proceeds. The blank card in the fifth position is put in place to keep card 6 from view during the process, so it should be removed and put aside when the magician arrives at that point. Then the front side of card 6 should be shown to the audience. If the number is on that side of the card, it should be placed facedown with that side touching the pile of cards. If the number is not on that side, the card should be turned over with the back side touching the pile of cards. The magician can then pick up the stack and with a little adjustment to make the cards flush, hold them up so that the audience can view the secret number.

Usually students are given models of the cards to trace the cutouts and then use scissors to create the openings. The numbers can readily be placed on the cards with reproduced grids and glue. Card 6 must have the numbers carefully placed to match the slots exactly so that the secret number will be easily visible at the conclusion of the activity.

At the point where the process behind the activities becomes familiar, the mathematics relating to the secret numbers and the connections among the three guessing devices can be introduced. The patterns in the binary representation of decimal numbers are the key to linking the three activities. The previous figure may help explain this connection.

Students are quick to note that in the first column from the right, every other position is shaded; and many will note that in the second column, two positions are shaded and then two positions are not shaded. Without the previous diagram, few students are able to discover these patterns. Fewer still will note that the pattern in each column to the left doubles, unless a visual model is used. Yet this crucial concept of the binary system is the basis for the activities. Students must be able to note that the pattern in the previous diagram is 1, 2, 4, 8, 16. The pattern of numbers is the same for all three guessing devices except that the "window cards" require the columns to be folded over so that they fit on the sheets. To test for generalization, students can be asked to extend the pattern to include larger numbers. For instance, what would be the pattern in the next column and why?

After the mystery of all the activities is uncovered, students are required to take the official oath of secrecy. This promise requires that the students never reveal the process of the guessing activities, but they are allowed to confirm the correct solution if someone describes the mathematics accurately. Students often decide to try their tricks with other members of the school community, which can include everyone from the principal to the physical-education teacher to the nurse.



1. The post office uses similar binary coding as the basis of a special sorting technique generated by involving machine-readable characters and lines that represent the ZIP codes. These strips of thick and thin lines are often found on self-adhesive labels or machine-printed envelopes and can be decoded into 0's and l's that translate into the digits used in coding mail.

937 figure 11
Binary Coding Used as a Postal Code

2. Students can explore, in groups, why the Post Office might use such a system. What are the advantages of using the binary system? Are there any disadvantages? Can you suggest alternative systems that the Post Office might use?

Questions for Students 

1. Students can be encouraged to draw conclusions from their experiences with the three activities.
* Why does this pattern work?
* Why do the numbers double?
* How does the pattern connect to making decisions?
Such a series of questions can help students discover that each column doubles the number of representations, that is, the columns work together-in a sense, as a place-value system-to form unique representations, or codes, for decimal numbers.

Learning Objectives

Students will:

  • Observe, describe, and analyze numerical patterns
  • Explore the binary system and its applications
  • Communicate their mathematical thinking coherently and clearly to peers, teachers, and others