ABSTRACT

Integer overflows and underflows are made possible by the way numbers are handled in computer memory. Each bit in computer memory has only two possible values, 1 or 0, and different numbers of bytes (units of 8 bits) are used to store integers based on the size of the number to be stored. If no negative numbers are needed, a signed datatype will often be used. In a signed datatype, the value is always positive, and a larger positive number can be stored in the same number of bytes than can be stored using an unsigned datatype because the first bit is not reserved to indicate whether the integer is positive or negative.