The GATE Grind

GATE 2017 EC – Question 55

Digital Circuits · Computer Organization · 2 marks · Multiple choice

The following FIVE instructions were executed on an 8085 microprocessor.

MVI A, 33H
MVI B, 78H
ADD B
CMA
ANI 32H

The Accumulator value immediately after the execution of the fifth instruction is

  1. 00H
  2. 10H
  3. 11H
  4. 32H

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.