# Saturday, 21 March 2009

I love this story. Seems a fellow was playing a low-stakes slot machine. This thing takes pennies, so if you win the "big jackpot" it doesn't rain pennies on you, it displays a message that says "you have won $xyz, please call an attendant over to this machine so you can collect" or words to that effect. Imagine his delight when it told him he had won 42.9 million dollars! Sadly, when the attendant arrived there was no 43 million dollar payout. The most that machine can pay out is $9,025.

So what happened? Here's the quote from the story:

In a confusing nutshell: Computers speak in a language of bits. Information is represented with zeros and ones. Very often, these numbers – both positive and negative – are stored in 32-bit sequences.

Still with me?

In this system, the number —1 can also be represented as 4294967295. Count that many pennies as dollars and you see 42,949,672.95.

The reporter wants you to know this is difficult. I want you to know it's hilarious. But then again, I didn't write a 43 million dollar signed/unsigned bug.

Kate

Saturday, 21 March 2009 17:59:39 (Eastern Standard Time, UTC-05:00)  #    Comments [0]
Comments are closed.