Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

MULTIPLE CHOICE Answer Part A. and Part B. below: Part A. Given the following MI

ID: 3588776 • Letter: M

Question

MULTIPLE CHOICE

Answer Part A. and Part B. below:

Part A. Given the following MIPS code:

add $12, $11, $10
or $10, $11, $12
and $9, $11, $13

The data dependency involves which register?

a. $9
b. $10
c. $11
d. $12
e. $13
---------------
Part B. What is the first part of the data hazard detection rule that will be used to solve the data dependency in the previous question?

a. if(MEM/WB.RegisterRd == ID/EX.RegisterRs)
b. if(EX/MEM.RegisterRd == ID/EX.RegisterRs)
c. if(MEM/WB.RegisterRd == ID/EX.RegisterRt)
d. if(EX/MEM.RegisterRd == ID/EX.RegisterRt)

Explanation / Answer

Part A. Given the following MIPS code:

add $12, $11, $10
or $10, $11, $12
and $9, $11, $13

The data dependency involves which register?

b. $10

Since $10 is the destination register in 1st instruction where addition of $12 and $11 are saved in $10

At the 2nd instruction , the register $10, is waiting for the first instruction to complete inorder to get the value in $10 as a result of 1st instruction.

Part B. What is the first part of the data hazard detection rule that will be used to solve the data dependency in the previous question?

c. if(MEM/WB.RegisterRd == ID/EX.RegisterRt)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote