INSTRUCTION: CMP
Compaling by Subtraction
For unsigned numbers:
2 bits in the flags register
ZF CF = 1 0> 0 0 <0 1
For Signed Numbers:
3 bits in the flags register
ZF of sf = 1 0> 0 1/0 1/0 <0 1/0 0/1
The Way of Examining Overflow:
Carry INTO MSB! = Carry Out of MSB
IF a posital a posital -> a negativeor a negative a negative -> a positivean overflow is generated
IF a NEGATIVE A POSITIVE OR A POSITIVE A NEGATIVETHERE WILL BE No Overflow