A Binary Card Trick

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 magic of Binary!


Amazing.

From Su, Francis E., et al. "Binary Card Trick." Mudd Math Fun Facts:


Every number between 1 and 15 has a unique representation as a sum of some collection of the numbers 1, 2, 4, and 8 (the four powers of two represented by a nibble, i.e. four bits). 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!

No comments:

Four Bits is a Nibble

"The binary numeral system, or base-2 number system, is a numeral system that represents numeric values using two symbols, usually 0 and 1. ... the binary system is used internally by virtually all modern computers. " - Wikipedia