0% found this document useful (0 votes)
72 views1 page

Carry Flag: AC, The Auxiliary

The document discusses four status flags in a computer's processor: CY (carry flag) which is set on carry out from bit D7 during addition/subtraction; AC (auxiliary carry flag) which is set if there is a carry from D3 to D4 during addition/subtraction; P (parity flag) which reflects the number of 1s in the accumulator register; and OV (overflow flag) which is set when a signed number operation results in a value too large that overflows into the sign bit. These flags provide information about results of operations for debugging or further processing.

Uploaded by

Ind Kanak
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views1 page

Carry Flag: AC, The Auxiliary

The document discusses four status flags in a computer's processor: CY (carry flag) which is set on carry out from bit D7 during addition/subtraction; AC (auxiliary carry flag) which is set if there is a carry from D3 to D4 during addition/subtraction; P (parity flag) which reflects the number of 1s in the accumulator register; and OV (overflow flag) which is set when a signed number operation results in a value too large that overflows into the sign bit. These flags provide information about results of operations for debugging or further processing.

Uploaded by

Ind Kanak
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

CY, the carry flag This flag is set whenever there is a carry out from the D7 bit.

This flag bit is affected after an 8bit addition or subtraction. It can also be set to 1 or 0 directly by an instruction such as SETB C and CLR C where SETB C stands for set bit carry and CLR C for clear carry. More about these and other bit-addressable instructions will be given in Chapter 8. AC, the auxiliary carry flag If there is a carry from D3 to D4 during an ADD or SUB operation, this bit is set; otherwise, it is cleared. This flag is used by instructions that perform BCD (binary coded decimal) arithmetic. See Chapter 6 for more information. P, the parity flag The parity flag reflects the number of 1 s in the A (accumulator) register only. If the A register contains an odd number of Is, then P = 1. Therefore, P = 0 if A has an even number of Is. OV, the overflow flag This flag is set whenever the result of a signed number operation is too large, causing the highorder bit to overflow into the sign bit. In general, the carry flag is used to detect errors in unsigned arithmetic operations. The overflow flag is only used to detect errors in signed arithmetic operations and is discussed in detail in Chapter 6.

You might also like