You put a deck of cards in your pocket, and invite anyone in the audience to call out a number between 1 and 15.
Then you reach into your pocket, you take out a set of cards whose sum is the number that was called!
How can you perform this magic trick?
The Math Behind the Fact:
This mathematical magic trick can be found in the reference
and is based on the properties of binary numbers. Every number between 1 and 15 has a unique representation as a sum of some collection of the numbers 1, 2, 4, and 8. (To see which collection, just take the given number and successively subtract the largest number of 1, 2, 4, and 8 that is less than the given number. That number is part of your collection. The subtraction yields a new number; now repeat the process with this number, over and over, until you get 0.) The collection of numbers you obtain reveals the binary decomposition of the given number into sums of powers of two (in contrast to the usual representation of a number into sums of powers of ten).
Now before the trick starts, pick an Ace, 2, 4, and 8 and put them on top of the deck, and then put the deck in your pocket.
Then when a number between 1 and 15 is called out, take the binary decomposition of the number, and use that to determine which of the first four cards you will pull out. No one needs to know that you never need to use the other cards!
How to Cite this Page:
Su, Francis E., et al. "Binary Card Trick."
Math Fun Facts.