



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




addi $10, $0, 0 L1: beq $8, $0, L addi $10, $10, 1 lw $8, 4($8) j L L2:
0010 0000 0000 1001 0000 0000 0000 1111 0010 0000 0000 1010 0000 0000 0000 0001 0010 0000 0000 1011 0000 0000 0000 0000 0000 0001 0110 1010 0101 1000 0010 0000 0010 0001 0100 1010 0000 0000 0000 0001 0001 0101 0010 1010 < binary for -12 >
X.S. Hu 5-
t i PCS^ PoCuWrcreit e= 10 ALUSrcA = 1 A ALLUUSOrcpB = = 0 010 P^ PCCSWour^ rtceCe =on 0 d 1 A^ ALLUUSSrcrcBA =^ = 010 ALUOp= 10 RegDst = 1 M IoemrDR =e a 1 d M IoemrDW =ri 1 te Me RmetgoWRergite = 0 RegDst= 0 Me^ RmegtoWRreigte= 1 ALUSrcA = 0 A ALLUUSOrcpB = = 0 101 A^ MLUemSrRceAa =d 0 IorD= 0 ALU^ IRSWrcrBite = 01 AL PUCOWp (^) r= te 00 PCSource = 00 Instruction fetch Inst rreucgitsiotenr^ dfeec tcohde/ co^ Bmrapnlecthion^ J cuommpplet on Execut on R-type complet on Wr te-back step (Op
A^ ALLUUSSrrccBA =^ = 1 10 ALUOp = 00 Memory address computation Memory (Op access
M acecmeossry 3 5 7 Start
slt $t2, $t0, $t bne $t2, $0, ELSE j DONE ELSE: addi $t2, $t2, 2 DONE:
sll $t0, $t0, 2 slt $t2, $t0, $