2,147,483,647 is 2^31 − 1, a Mersenne number that Leonhard Euler proved prime in 1772 and that later became the largest value storable in a standard signed 32-bit integer. Computers store whole numbers in binary using fixed-size boxes of switches; a 32-bit signed integer uses one bit for the sign and 31 bits for magnitude, so with all 31 magnitude bits set the value sums to 2,147,483,647. That binary structure explains both the neat arithmetic (it is the sum 1 + 2 + 4 + … + 1,073,741,824) and why adding one flips the sign bit: the next representable pattern is −2,147,483,648, an overflow analogous to an odometer rolling from 999,999 to 000,000.
That overflow has real consequences. A popular video approached this ceiling in December 2014, prompting a switch to 64-bit counters; many games, databases and legacy systems still exhibit score flips or crashes when limits are exceeded. Examples include a Boeing 787 generator counter that would overflow after about 248 days at 100 ticks/second (requiring periodic reboots until patched) and a 2004 airline crew-scheduling failure caused by a 16-bit limit of 32,768 that grounded flights. Time counters stored as 32-bit seconds will hit 2,147,483,647 at 03:14:07 UTC on 19 January 2038 unless updated. Moving to 64-bit raises the ceiling to 9,223,372,036,854,775,807, but every machine number still lives inside a finite box chosen by designers.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.