Integer overflow: Difference between revisions

Content deleted Content added
Security ramifications: accidental overflow triggering an exception condition (interrupt?)
Akuyume (talk | contribs)
Origin: actual value
Line 10:
: 32 bits (the most common width for personal computers [[as of 2005]], maximum representable value 4,294,967,295),
: 64 bits (maximum representable value 18,446,744,073,709,551,615),
: 128 bits (maximum representable value approx. 102<sup>38128</sup> - 1)
 
Since an arithmetic operation may produce a result larger than the maximum representable value, a potential error condition may result. In the [[C (programming language)|C programming language]], for example, signed integer overflow causes [[undefined behavior]], although arithmetic on unsigned integers, however, is reduced [[modular arithmetic|modulo a power of two]], meaning that unsigned integers "wrap around" on overflow.