GATE / CS ARCHIVE

GATE CSE 1997 / QUESTION 5.2

8085 decimal adjustment

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

GATE 1997, Q5.2 2 marks · MCQ
Report issue

Data Representation & Arithmetic

Question 5.2, GATE 1997: Execute MVI A, 55H; MVI C, 25H; ADD C; DAA. Find final A among 7AH, 80H, 50H, 22H.
Tap to enlarge
Your answer
Answer & solution

Answer: B: 80H (no official key was published)

Binary addition first gives 55H+25H=7AH. The low nibble A hexadecimal represents 10, which is invalid as one BCD digit. DAA adds 06H to correct that nibble, producing 80H. The resulting high nibble 8 is valid, so no further 60H correction is required. Thus B. Interpreting the initial bytes as packed decimal 55 and 25 confirms the decimal sum 80; stopping before DAA would incorrectly choose 7AH.

Original paper, page 5