Content deleted Content added
Line 16:
* 128 bits: maximum representable value 2<sup>128</sup> − 1 = 340,282,366,920,938,463,463,374,607,431,768,211,455
When an arithmetic operation produces a result larger than the maximum above, an integer overflow reduces the result to [[modulo operation|modulo]] of the maximum possible value, effectively causing a ''wrap around''; subtracting from a small value may also cause a wrap to a large positive value (for example, 8-bit integer addition 255 + 1 results in 0, which is {{math|256 mod 255}}, and similarly subtraction 0 - 1 results in 255, a [[two's complement]] representation of -1).
{{anchor|Security ramifications}}
If the variable has a [[Signed number representations|signed integer]] type, a program may make the assumption that a variable always contains a positive value. An integer overflow can cause the value to wrap and become negative, which violates the program's assumption and may lead to
==Methods to mitigate integer overflow problems==
|