Overflow definition
Overflow occurs when a numerical result exceeds the range available in its representation.
Overflow in a picture
How it works
In floating-point arithmetic, an exact result may have magnitude too large for the format’s finite range. The returned value can be infinity or a largest finite value depending on rounding behavior. Fixed-width integer systems can instead wrap, report an error, or clamp the result according to their rules.
Worked examples
Can 100 + 40 fit in an unsigned eight-bit integer?
Yes, because 140 is below 256.
What happens to 256 in arithmetic that wraps modulo 256?
It wraps to 0.
Can a very large negative result overflow a signed format?
Yes, if it falls below the minimum representable value.
Common mistake
Separate overflow from rounding a value inside the range. Overflow concerns the range of available values.
Quick check
Is the result always infinity?
Show answer
No. It depends on the representation and arithmetic rules.
What sets the finite range of a floating-point format?
Show answer
Its available significands and exponents.
Sources
Flashcard
Overflow
Reveal the definition
Overflow occurs when a numerical result exceeds the range available in its representation.
Effortless Math. “Overflow.” Math Dictionary.



