Sunday, May 18, 2008

Happy birthday Holly, from your nerd

Holly just had a birthday, and I had a flash of inspiration when I was putting candles on her birthday pie... See if you can tell how old she is - with as few hints as you can! :)



Hint 1: I'm a computer programmer by trade.

Hint 2: Next year, she'll only get one candle. (And it'll be way over on the left.)

Hint 3: Read the candles as "11111".

Solution: It's in binary - she's 31 years old. My inspiration was that her age, plus one year, is a perfect power of two. Therefore, her current birthday would be represented as all ones. Here's roughly how it works, in binary (2-based counting that computers use) as compared to decimal (our regular, 10-based counting).

(X^Y means X to the power of Y.)

11111 (decimal, "regular"):
Each 1 means 10^X, where X is the position from the right, minus one.
10^4 + 10^3 + 10^2 + 10^1 + 10^0 = 10,000 + 1,000 + 100 + 10 + 1 = 11111

11111 (binary):
Each 1 means 2^X, where X is the position from the right, minus one.
2^4 + 2^3 + 2^2 + 2^1 + 2^0 = 16 + 8 + 4 + 2 + 1 = 31

Next year, she (and I) will turn 32 = 100000 in binary. When I said I wished I could hit six figures by my early thirties, this isn't what I had in mind...

2 comments:

Broken Suitcases said...

Wow, you have just out-nerded...well, yourself. I didn't understand any of that, but nice photo of Holly!

Claude said...

It's sad that I got that without any hints.

It's even sadder that I once tried to explain to my parents-in-law how you can count up to 31 using the digits of only 1 hand.