Auxiliary Carry Flag in 8086 Microprocessor
Auxiliary Carry Flag (AF) is one of the six status flags in the 8086 microprocessor.
- This flag is used in BCD (Binary-coded Decimal) operations.
- The status of this flag is updated for every arithmetic or logical operation performed by ALU.
- This flag is set to one if there is a CARRY from the lower nibble or BORROW for the lower nibble in binary representation.
- Else it is set to zero.
Note : Auxiliary Carry Flag is to set to one when there is a carry from the units place in hexadecimal representation. Same as the lower nibble in binary representation.
In the below image, you can see a carry takes place from the units digit. Hence auxiliary carry flag is set to one here. Here ‘H’ represents a hexadecimal number.
Auxiliary Carry Flag in Hexadecimal Representation
Let us consider the same example in binary representation.
29H = 0010 1001
+4CH = 0100 1100
75H = 0111 0101
^ here there is carry generated and forwarded to next nibble, so the auxiliary carry flag is set to one.