The result from an arithmetic calculation that exceeds the space designated to hold it.
Download Computer Desktop Encyclopedia to your PC, iPhone or Android.
The term arithmetic overflow or simply overflow has the following meanings.
Most computers distinguish between two kinds of overflow conditions. A carry occurs when the result of an addition or subtraction, considering the operands and result as unsigned numbers, does not fit in the result. Therefore, it is useful to check the carry flag after adding or subtracting numbers that are interpreted as unsigned values. An overflow proper occurs when the result does not have the sign that one would predict from the signs of the operands (e.g. a negative result when adding two positive numbers). Therefore, it is useful to check the overflow flag after adding or subtracting numbers that are represented in two's complement form (i.e. they are considered signed numbers).
There are several methods of handling overflow:
Division by zero is not a form of arithmetic overflow. Mathematically, division by zero within reals is explicitly undefined if the problem is zero divided by zero, and is defined as either positive or negative infinity depending on the signs of the numbers involved, or is undefined.
Arithmetic overflow is a fairly common cause of software failures. Such overflow bugs may be hard to discover and diagnose because they may manifest themselves only for very large input data sets, which are less likely to be used in validation tests.[1]
For example, an unhandled arithmetic overflow in the engine steering software was the primary cause of the crash of the maiden flight of the Ariane 5 rocket. The software had been considered bug-free since it had been used in many previous flights; but those used smaller rockets which generated smaller accelerations than Ariane 5's.
This entry is from Wikipedia, the leading user-contributed encyclopedia. It may not have been reviewed by professional editors (see full disclaimer)