Open In App

GATE | Gate IT 2007 | Question 39

Like Article
Like
Save
Share
Report

Data forwarding techniques can be used to speed up the operation in presence of data dependencies. Consider the following replacements of LHS with RHS.
2007_39
In which of the following options, will the result of executing the RHS be the same as executing the LHS irrespective of the instructions that follow ?
(A) (i) and (iii)
(B) (i) and (iv)
(C) (ii) and (iii)
(D) (ii) and (iv)
(E) Only (i)


Answer: (B)

Explanation: (i) Is true, as both registers and location contain the value of R1
(iii) is wrong because in LHS R2 is writing last but not in RHS.
(iv)True, as first write to LOC is useless, as it is overwritten by R2.

(ii) false, because R2 get the correct data, but location has not got updated.

Quiz of this Question


Last Updated : 25 Nov, 2019
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads