Integer overflow: Difference between revisions

Content deleted Content added
Akuyume (talk | contribs)
Origin: actual value
rv: A power of 10 value is easier to visualize
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 2approx. 10<sup>12838</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.