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

Quiz 5 The single-clock-cycle MIPS datapath is given as follows, which is used t

ID: 3716291 • Letter: Q

Question

Quiz 5 The single-clock-cycle MIPS datapath is given as follows, which is used to implement the instruction: add $2, $4, $5. The register values are in the following table. instruction 125-O Shirt, Jump address (31-0 28PC (31-2) Add Shift left 2 RegDst MemRead Instruction (31-26) ALU RegWrite Instruction [25-21] · register 1 Read PC address Read data t register 2 instruction 120-16R ALU ALUAddress dataM 31-0) Instruction Write data 2 register truction [15-1111 Wrte date Registers Write Data data memory instruction [15-01 Sign- -2 ALU r 6 r8 r12 r r2 12 128 19 r0 r1 r 3 10 What are the values of the ALU control unit's inputs for this instruction?

Explanation / Answer

Answer is as follows:

According to given instruction add $2,$4, $5

the contents of register r4 and r5 are added and store the result to register r2.

So the contents of register r2 changed only.

i.e.

r4 contains 10 and r5 contains 8 and after addition the result store in r2 i.e. 18.

All other values remain same except r2 that contain 18 now.

if there is any query please ask in comments...