The overflow flag (OF) signals that the result of arithmetic operations on signed operands is out of range. Its value is defined as (X XOR Y), where X is the transfer for the bit grid (that is, what is entered in the CF flag), and Y is the transfer to the high order. Thus, the OF flag is designed to detect overflow when working exclusively with signed operands — for unsigned , the CF flag does this work.