If you're idly cruising the Play Store on the web, checking out the most downloaded apps ever, you might stumble onto a little glitch when an install count crosses 1 billion. That's right, billion... We're talking 9 zeros, folks! Hitting this illustrious mark will result in an install range that reads 1,000,000,000 - 705,032,704. Not only does tradition tell us that the larger number should come second, but that is an exceptionally specific amount.

Screen Shot 2014-02-13 at 3.14.51 AM

The bug is actually the result of an integer overflow. I probably just lost most of the non-programmers out there, but this one is pretty simple. If you know and understand binary, feel free to skip the next paragraph.

For non-programmers: All computer data is stored as bits, represented as 1 or 0. Using a numbering system called Binary, we can interpret groups of bits as larger numbers. The computer world has a standard convention of grouping 8 bits together to form a byte. From there, the sizes tend to double as needed. A particularly common size for storing an integer (number without a decimal point) is 32 bits, or 4 bytes. It's this common size that holds the key to this error.

Unfortunately, the highest number that can be represented by an unsigned 32-bit integer is 4,294,967,295. To reach 5 billion requires a 33rd bit. The value may be stored in a larger space on Google's servers, but it is eventually treated as a 32-bit integer, which chops off the leading bit. As you might be able to guess, the result is 705,032,704. Here is what the numbers look like in binary.


Note: These binary sequences are treated as unsigned integers

Google Play Services is almost certainly the first and only app to join the Billion Installs Club, so far. Even GMail and Facebook are still locked into the 500 million - 1 billion range. Thanks to the Internet Archive Wayback Machine, we can further deduce that the install count only hit 10 digits about 3 weeks ago, somewhere between the 24th and 31st of January.

On the plus side, this doesn't matter at all. Everything else is working fine, we just have the wrong number for something that doesn't matter very much. It's just a little something to chuckle at on this Thursday. Hey, who said a Bug Watch had to be totally serious?

Oh yeah, and let's just wrap this up with something from xkcd.


Image Credit:xkcd

Thanks, Neznani Oboževalec