edited by
3,927 views
5 votes
5 votes

Consider the following Assembly language program

MVIA 30 H
ACI 30 H
XRA A
POP H

After the execution of the above program, the contents of the accumulator will be

  1. $\textsf{30 H}$
  2. $\textsf{60 H}$
  3. $\textsf{00 H}$
  4. contents of stack
edited by

2 Answers

Best answer
14 votes
14 votes

MVI: - move immediate data to a register or memory location.

ACI: - Add immediate to accumulator with carry.

XRA: - The content of accumulator are exclusive OR with specified register or memory location.

So after first instruction execution, Accumulator(assuming 8 bit) value will be A=30H=0011 0000

After second Instruction A=30+30=60H=0110 0000

After third Instruction A=A⊕A=0010 0000⊕0010 0000=0000 0000=00H

correct answer is C

edited by
1 votes
1 votes

XRA A means exclusive OR of Acumulator content with itself. Whatever the value would be of acumulator, ans is zero. Beacuse same number XOR operation with itself is zero.

Answer:

Related questions

4 votes
4 votes
4 answers
1
2 votes
2 votes
2 answers
2
go_editor asked Jun 13, 2016
4,345 views
In C, what is the effect of a negative number in a field width specifier?the values are displayed right justifiedthe values are displayed centeredthe values are displayed...
5 votes
5 votes
3 answers
3
go_editor asked Jun 13, 2016
2,653 views
A Steiner patch isBiquadratic Bezeir patchBicubic patchCircular patch onlyBilinear Bezier patch
6 votes
6 votes
1 answer
4
go_editor asked Jun 13, 2016
8,624 views
We can make a class abstract byDeclaring it abstract using the virtual keywordMaking at least one member function as virtual functionMaking at least one member function a...