Integer overflow: Difference between revisions

Content deleted Content added
m spelling
No edit summary
Line 3:
In [[computer programming]], an '''integer overflow''' occurs when an [[arithmetic]] operation attempts to create a numeric value that is outside of the range that can be represented with a given number of bits – either larger than the maximum or lower than the minimum representable value.
 
The most common result of an overflow is that the least significant representable bits of the result are stored; the result is said to ''wrap'' around the maximum (i.e. modulo power of two).
 
An overflow condition gives incorrect results and, particularly if the possibility has not been anticipated, can compromise a program's reliability and [[software security|security]].
 
On some processors like [[graphics processing unit]]s (GPUs) and [[digital signal processor]]s (DSPs), thewhich resultsupport [[saturation arithmetic|saturates]]; that is, onceoverflown theresults maximumwould value isbe reached"clamped", anyi.e. attemptset to increase itthe alwaysminimum returnsor the maximum integer value in the representable range, rather that wrapped around.
 
== Origin ==