GATE | Gate IT 2007 | Question 39

Data forwarding techniques can be used to speed up the operation in presence of data dependencies. Consider the following replacements of LHS with RHS.
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

My Personal Notes arrow_drop_up

Improved By : Akhilesh_Raturi

Article Tags :

Be the First to upvote.

Please write to us at to report any issue with the above content.