Year 2038 Bug Details |
This is intended to be a simple explanation of the technical reasons for the Year 2038 Bug.
Computers store information as a series of ones and zeroes. This system of ones and zeroes is called binary. Each binary digit is called a bit. Each bit can represent two unique values (one and zero). For every additional bit used, the possible unique combinations doubles: Two bits can represent four values, three bits can represent eight values, etc.
This is similar to the more common decimal numbering system, in which each digit can represent ten values (0-9). For every additional decimal digit (dit?), the possible unique combinations increases by ten times: Two decimal digits can represent one-hundred values, three decimal digits can represent one-thousand values, four digits can represent ten-thousand values, etc.
When a collection of bits can represent a negative number, one of the bits (called the sign bit) is reserved to represent whether or not the number is negative. Numbers which can be negative are called "signed" numbers.
A "byte" (8 bits) is the most commonly known grouping of bits. There are other commonly used sizes of bit groups. 32 bits, for example.
Most of today's computers use 32-bit signed values to represent the current time (as seconds since 12:00 AM, Jan 1, 1970). Since negative numbers are not used, the sign bit is wasted. This leaves only 31 bits. The number of values which can be represented in 31 bits can be calculated by doubling two thirty-one times (2^31, or two to the thirty-first power). Since one of those values is zero, the maximum number which can be represented by thirty-one bits is 2^31-1.