CO-Test 2-Question 13

0 votes
The memory locations 100, 200, 300 and 400 have data values 200, 400, 100 and 300 
respectively before the following program is executed. Note that instructions with 
an I in the end of an operation use immediate values of operands. The structure 
of instructions is as follows: OP CODE RESULT, OP ERAND1, OP ERAND2 OP ERAND3... 
where RESULT is the register which stores the result of the operation OP CODE 
performed on OP ERAND1, OP ERAND2, OP ERAND3 and so on. Number of operands may 
vary based on type of instruction. 
MOVI R1, 400 
MOV R2, 300 
ADDI R2, R2, 200 
SUB R2, R2, 300 
SUB R1, R1, R2 
STORE 100(R1), R2 
Which of the statements below is not TRUE after the program is executed ? 
(A) Memory location 100 has value 200 
(B) Memory location 200 has value 200 
(C) Memory location 300 has value 200 
(D) Memory location 400 has value 300
asked Sep 29 in Computer Organization by getgatebook (36,710 points)
reshown Oct 13 by getgatebook

1 Answer

0 votes
Data Value 200 400 100 300
Locations 100 200 300 400

Structure of Instruction : Opcode   Result, Operand1, Operand2.........

MOV R1 400                            R1 stores the address 400

MOV R2 300                            R2 stores the address 300

ADD R2 R2 200                       R2 stores 500 after computing the addition.

SUB R2 R2 300                       R2 stores 200 after computing the substraction.

SUB R1 R1 R2                        R1 stores 200 after computing the substraction.

STORE 100(R1) R2                200 is stored at address of [100+R1] = [100+200=300] 

B option false.

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