<<< The Processor Flags (Condition Codes) | Index | Overflow Condition >>> |
When numbers are added and subtracted, carry flag CF represents
9th bit, if 8-bit numbers added
17th bit, if 16-bit numbers added
33rd bit, if 32-bit numbers added
and so on.
With addition, the carry flag CF records a carry out of the high order bit. For example,
mov al, -1 add al, 1 ; AL = 0, ZF and CF flags are set to 1
When a larger number is subtracted from the smaller one, the carry flag CF indicates a borrow. For example,
mov al, 6 sub al, 9 ; AL = -3, SF and CF flags are set to 1
The result is -3, represented internally as 0FDh (binary 11111101).
<<< The Processor Flags (Condition Codes) | Index | Overflow Condition >>> |