 
 
Signed conditional jump instructions are used to test signed numbers. Signed numbers use 2's complement representation. Note that equal and not equal comparisons are the same for signed and unsigned numbers and are based on the Zero flag (ZF). The following table shows all possible conditional jump instructions for signed number comparisons. The table also shows when a jump is taken based on the status flags.
The next table shows a set of two numbers n1, n2 and the result of executing the instruction CMP n1, n2 on the flags ZF, OF, SF.
It can observed from the above table that when n1 is greater than n2, the OF is equal to the SF. Also, it can be observed that when n1 is smaller than n2 the OF is not equal to the SF. However, it can be observed that when the two numbers are equal, the OF is also equal to the SF. Thus, the condition for checking whether n1 is greater than n2 is that the OF is equal to the SF and that the ZF=0. On the other hand, it is sufficient to check that the OF is not equal to the SF to know that n1 is smaller than n2.
