In
computer processors, the overflow flag (sometimes called V flag) is usually a single
bit in a system
status register used to indicate when an
arithmetic overflow has occurred in an operation. An example of the use of the overflow flag is what happens if you were to add 127 and 127 using 8-bit signed integers. The mathematical answer is 254, but in binary this is 1111 1110 in
Two's complement which is negative (-2). The overflow flag is set to indicate a problem, so the software can be aware of the problem and act accordingly to compensate or mitigate the error. The overflow flag is usually computed as the
xor of the carry into the sign bit and the carry out of the sign bit.
See more at Wikipedia.org...