ISRO Electronics & Communication (ECE) 2016 - Question 72

All ISRO Electronics & Communication (ECE) papers | ISRO Electronics & Communication (ECE) 2016

Topic: Microprocessors

How is the status of the carry, auxiliary carry and parity flag affected if write instruction?
MOV A, #9C
ADD A, #64H

  • A. $CY=0, AC=0, P=0$
  • B. $CY=1, AC=1, P=0$
  • C. $CY=0, AC=1, P=0$
  • D. $CY=1, AC=1, P=1$

Answer: B. $CY=1, AC=1, P=0$

Explanation: 9CH = 1001 1100
64H = 0110 0100
Addition: 1001 1100 + 0110 0100 = 1 0000 0000 (Result is 00H with a carry).
Since there is a carry out of D7, CY=1.
There is a carry from D3 to D4, so AC=1.
For 8051, P=1 when there is an odd number of 1's in the accumulator. Since 00H has zero 1's, P=0.

| | All questions of ISRO Electronics & Communication (ECE) 2016