Gate CS-2007 Question Paper With Solutions

Q. 19 In a simplified computer the instructions are:

Gate CS-2007 Question Paper With Solutions

The computer has only two registers, and OP is either ADD or SUB. Consider

the following basic block:

Gate CS-2007 Question Paper With Solutions

Assume that all operands are initially in memory. The final value of the computation

should be in memory. What is the minimum number of MOV instructions in the

code generated for this basic block?

(A) 2

(B) 3

(C) 5

(D) 6

Answer: (B)

Explanation:

Gate CS-2007 Question Paper With Solutions

Learn More:   Gate ME-2019-1 Question Paper With Solutions

LEAVE A REPLY

Please enter your comment!
Please enter your name here