Professional Documents
Culture Documents
ANSWER:
Overflow is a situation that occurs when the result of an arithmetic operation
exceeds the maximum or minimum value that can be represented by the data type
used to store the value. (i.e., when the magnitude of a number exceeds the
range allowed by the size of the bit field).
Consider this example: if you add two large numbers and the result is larger than
the maximum value that can be stored in the data type used, an overflow occurs.
Yet, how can it be detected? Overflow can be detected by examining the result of
an arithmetic operation and comparing it to the maximum or minimum value that
can be represented by the data type used. If the result is larger than the maximum
value or smaller than the minimum value, an overflow has occurred.