Home > Back-end > Unsigned integer subtraction of the carry flag is set
Unsigned integer subtraction of the carry flag is set
Time:01-24
Recently in the "deep understanding of computer systems," say when a and b are unsigned integers, t=a - b in performing calculations, when a - b<0, CMP instructions will set the carry flag, but, for example, 4 to 7=0100 + 1001=1101 (regardless of the number of signed or unsigned number computer are converted to complement the addition subtraction), the highest at this time did not carry, why will set the carry flag? Or is the carry flag CMP instruction to judge the results after less than zero set forced?