Overflow bit

from Wikipedia, the free encyclopedia

The overflow bit ( English overflow flag ) is a term from computer science or computer architecture . It denotes a bit or status register , which in many processors indicates that an overflow has occurred during a calculation .

When adding or subtracting numbers in two's complement representation the overflow is normally calculated by the XOR (exclusive OR) of the carry bit ( carry ), which goes into the sign position (in two's complement is this is the sign bit ), and the carry that goes beyond the sign. Then the overflow bit is 1 exactly when an overflow or underflow occurs during the calculation, i.e. the correct result is greater than the largest or smaller than the smallest representable number.