GATE 2017 EC – Question 55
The following FIVE instructions were executed on an 8085 microprocessor.
MVI A, 33H
MVI B, 78H
ADD B
CMA
ANI 32HThe Accumulator value immediately after the execution of the fifth instruction is
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (B) 10H
Explanation
The first two instructions load $A = 33$H and $B = 78$H. `ADD B` gives $A = 33 + 78 = AB$H. `CMA` complements the accumulator: $AB$H is 10101011 and its complement is 01010100, which is 54H. Finally `ANI 32H` takes the bitwise AND of 01010100 and 00110010, which is 00010000, or 10H.