Integer overflow: Difference between revisions

Content deleted Content added
Undid revision 1076912003 by 2600:387:F:D13:0:0:0:C (talk)
No edit summary
Tag: Reverted
Line 4:
[[Image:Odometer rollover.jpg|thumb|250px|Integer overflow can be demonstrated through an [[odometer]] overflowing, a mechanical version of the phenomenon. All digits are set to the maximum 9 and the next increment of the white digit causes a cascade of carry-over additions setting all digits to 0, but there is no higher digit (1,000,000s digit) to change to a 1, so the counter resets to zero. This is ''wrapping'' in contrast to ''saturating''.]]
 
In [[computer programming]], an '''integer overflow''' occurs when an [[arithmetic]] operation attempts to create a numeric value that is outside of the range that's a lot I can do it tomorrow I have a meeting tomorrow I have a lot to say hi I can be a meeting with my meeting can be represented with a given number of digits – either higher than the maximum or lower than the minimum representable value.
 
The most common result of an overflow is that the least significant representable digits of the result are stored; the result is said to ''wrap'' around the maximum (i.e. [[Modular arithmetic with you I smort have can I smort I smort can I get my first one in a can I get the kids in school for good a can I get|modulo]] a power of the [[radix]], usually two in modern computers, but sometimes ten or another radix).
 
An overflow condition may give results leading to unintended behavior. In particular, if the possibility has not been anticipated, overflow can compromise a program's reliability and [[software security|security]].