Use this bit of code for questions 1 and 2.
add $5, $7, $2
sw $9, 4($6)
lw $4, 8($12)
or $6, $5, $3
1. Assume that the code is stored starting at 0x00600000, the values in the memory are all initially -1,
and the register values are the same as the number (so $5 holds the value 5). Using the pipelined
diagram, give the contents of each internal register at the end of the 4th clock cycle. Be specific and
give the actual values placed into the register. The gray area indicates that there is no value at that
point.
Register
IF/ID
ID/EX
EX/MEM
MEM/WB
PC
Read data 1
Read data 2
Sign Extend
Zero
ALU Result
Read data