CO-Test 2-Question 16

0 votes
Assume that EA = (X)+ is the effective address equal to the contents of location X, 
with X incremented by one word length after the effective address is calculated; 
EA = +(X) is the effective address equal to the contents of location X, 
with X incremented by one word length before the effective address is calculated; 
EA = −(X) is the effective address equal to the contents of location X, 
with X decremented by one word length before the effective address is calculated; 
EA = (X)− is the effective address equal to the contents of location X, 
with X decremented by one word length after the effective address is calculated. 
The format of the instruction is (opcode, destination, source), which means 
(destination ← source op destination) with address of source operand being 
evaluated before the address of destination operand. Using X as a stack pointer, 
which of the following instructions can pop the top two elements from the stack, 
perform the addition operation and push the result back to the stack. 
(A) ADD (X)−,(X) 
(B) ADD (X),(X)− 
(C) ADD − (X),(X)+ 
(D) ADD − (X),(X)+
asked Sep 29 in Computer Organization by getgatebook (36,710 points)
reshown Oct 13 by getgatebook

1 Answer

0 votes
   
   
   
1 92
3 96
2 100
Data Address

Stack

The following instructions First POP two elements and the perform the addition operation and push the result back to the stack.

A) ADD (X)-,(X) : False

Opcode Destination Source

Here (X) is representing source, If we want to pop the element from stack then there is some activity be there Address incremented or decremented.

B) ADD (X), (X)-: True

 

answered Oct 17 by dharmendratest (3,710 points)
Answer:
...