Content deleted Content added
m Spelling "two's-compliment" -> "two's-complement" |
m Robot-assisted disambiguation (you can help!): Binary |
||
Line 4:
[[Integer (computer science)|Integer]] numbers are frequently used in computer programs on all types of systems, since integer math operations are able to be executed quickly even on systems that do not have integrated [[floating-point]] math capabilities.
The size of the number able to be stored (and the size of the possible result) is based on the [[register width]] of the processor on which the code is to be executed. Common [[Binary numeral system|binary]] sizes for integers include 8 bits, 16 bits, 32 bits (the most common width as of 2005), 64 bits, and 128 bits.
Since a math operation may give a result larger than the available register width, an error condition may result. The [[ISO]] [[C99_standard|C99 standard]] (also known as printed standard ISO/IEC 9899:1999 (E)) defines the behavior of software compilers. However, this standard defines the appropriate behavior for the integer overflow case to be "undefined behavior." Different compilers may treat this error condition in various ways, including ignoring the overflow completely, and simply returning the smallest or largest portion of the result (depending on whether the system is [[little endian]] or [[big endian]]).
|