Section 6.6: Condition Codes (Frame 1)                     [     ][home][next]

When a program does arithmetic, it often has to make decisions based on the results: whether overflow occurred, if the result is 0 or negative, if the result is positive, and so forth. Thus, most computers have four bits coming out of the adder which give this kind of information. These are:

Carry bit C if there was a final carry out, this bit is 1. This signals overflow if the two operands are unsigned.
Negative bit N if the result of the addition is negative assuming 2's complement, this bit is 1.
Overflow bit V if there was an overflow after adding two 2's complement numbers, this bit is 1.
Zero bit Z if the result of the addition is 0 (all 0s), this bit is 1.