Content deleted Content added
Undid revision 166405484 by 24.215.238.234 (talk) |
|||
Line 4:
The [[register width]] of a [[processor]] determines the range of values that can be represented. Typical [[Binary numeral system|binary]] register widths include:
: 8 bits (maximum representable value 2<sup>8</sup> - 1 = 255),
: 16 bits (maximum representable value 2<sup>16</sup> - 1 = 65,535),
: 32 bits (the most common width for personal computers [[as of 2005]], maximum representable value 2<sup>32</sup> - 1 = 4,294,967,295),
: 64 bits (maximum representable value 2<sup>64</sup> - 1 = 18,446,744,073,709,551,615),
: 128 bits (maximum representable value
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]], signed integer overflow causes [[undefined behavior]], while unsigned integer overflow causes the number to be reduced [[modular arithmetic|modulo a power of two]], meaning that unsigned integers "wrap around" on overflow.
|