02 Homework 1 (Microprocessor)
02 Homework 1 (Microprocessor)
02 Homework 1 (Microprocessor)
5. Auxiliary Flag (AF or auxiliary carry flag) or digit carry (DC indicators)
It is a condition flag bit in the status register of many CPU families,
such as the Intel 8080, Zilog Z80, the x86, and the Atmel AVR series,
among others. It indicates when a carry or borrow has been generated
out of the least significant four bits of the accumulator register
following the execution of an arithmetic instruction. It is primarily used
in decimal (BCD) arithmetic instructions.
The Auxiliary Carry Flag in x86
The Auxiliary Carry Flag (AF) is a CPU flag in the FLAGS register of
all x86-compatible CPUs,[2] and the preceding 8080-family. It has
occasionally been called the Adjust Flag by Intel.[3] The flag bit is
located at position 4 in the CPU flag register. It indicates when an
arithmetic carry or borrow has been generated out of the four least
significant bits, or lower nibble. It is primarily used to support binary-
coded decimal (BCD) arithmetic.