GATE / CS ARCHIVE

GATE CSE 2002 / QUESTION 2.4

Auxiliary carry and carry in an 8085 sum

Computer Organization & Architecture · Data Representation & Arithmetic · Full GATE CSE 2002 paper

GATE 2002, Q2.4 2 marks · MCQ
Report issue

Data Representation & Arithmetic

Question 2.4, GATE 2002: Determine the auxiliary carry AC and carry CY flags after this 8085 instruction sequence:
MVI H, 5DH
MVI L, 6BH
MOV A, H
ADD L
(A) AC=0, CY=0; (B) AC=1, CY=1; (C) AC=1, CY=0.
(D) Source variant: GFG prints AC=0, CY=0 (duplicating A), whereas GateForum prints AC=0, CY=1. Original official wording is not verified.
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

Step 1: Perform both the nibble sum and the full sum.

Step 2: At the low nibble, hexadecimal D+B=13+11=24=16+8, so a carry crosses the bit3 boundary. At the high nibble,5+6+1=12=C, without a carry beyond the byte. Hence the result is C8, auxiliary carry 1, full carry 0. Source option D differs between reproductions, but neither version competes with the computed option C.

Conclusion: A receives 5D₁₆ and ADD L adds 6B₁₆, yielding C8₁₆. The low nibbles D+B=18₁₆ generate a carry out of bit3, so AC=1. The full sum is below 100₁₆, so CY=0. Thus C.

Original paper, page 4