The Binary Dino Puzzle

3 min read Original article ↗

A nerdtastic adventure with children’s toys and binary

Gant Laborde

On my daughter’s 1st birthday she got a cute dinosaur that ate circular discs with different fruit printed on them and sang a song for each one. Someone asked, “how does it know one piece of plastic from another?” and that question secretly sent me into a nerd adventure.

This is the story of the Binary Dino; “my daughter’s toy” and a fun puzzle.

Press enter or click to view image in full size

You feed the Dino a mushroom 🍄, it knows. You feed the Dino apples 🍎, it knows. My first thought is that each plastic disc has some kind of RFID token, and the head had some kind of low power RFID reader. Yeah… in a children’s toy? C’MON GANT!

Here’s the Dino in action. Listen to its response after each disc:

An RFID reader would be a bit excessive for a children’s toy. Upon closer inspection, the Dino’s mouth had 4 taste buds.

OK… OK, 4 momentary switches, but I like thinking of them as taste buds. As each circular disc gets pressed into the mouth, it makes sense that the sides of each disc would activate some unique combination of these switches.

Press enter or click to view image in full size

Each switch is either pressed (on) or bypassed (off), just like bits in a computer. So, BINARY!

If you’re familiar with binary, you know 4 bits provide 16 possible permutations (0000 to 1111).

Nerd out moment! Binary is magical like that, since it’s the smallest super-increasing set, the max value 1111 (15) also represents the number of possible permutations sans zero.

That is 2^x -1= binary 1, x times

By pressing unique combinations on these “taste-buds” we can fire a unique response in our Dino.

We’ll throw out all-zero (0000) since that’s the default state (off/ready). So that leaves us with 15 possible flavor combinations, right?

Get Gant Laborde’s stories in your inbox

Join Medium for free to get updates from this writer.

Remember me for faster sign in

Let’s take a look at the discs to see if we’re right!

The Discs

The toy comes with 8 discs, not 15. But we are right about the unique edges. I stacked the discs into a single column and quickly converted the higher ridges to 1s and the lower ridges to 0s. I then converted that binary to base 10 and surprisingly the numbers jumped around a bit.

Press enter or click to view image in full size

I’ll admit, I had no clue what was going on at first. The numbers don’t fit any pattern I would expect, they don’t even fit any well-known sequence I could think of! Why skip 4? Why skip any numbers? Fun Fact: 1, 2, 3, 5, 6, 7 is how you count your steps if you’re Salsa dancing, but that has nothing to do with this, right? If I hold down the pins for missing discs will I break my kid’s toy? Will it go into developer mode? Will it speak Piglatin?

Perplexed, life moved on, and I finally gave the toy back to my daughter with a few unanswered questions. Randomly, later, it hit me. I figured it out.