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

Please answer the two questions below, thanks. 1. For each instruction, what are

ID: 2291694 • Letter: P

Question

Please answer the two questions below, thanks.

1. For each instruction, what are the values generated by the ALU Control in the figure below? Write your answer in the table below (a) beg Stl, St2, 100 sw $t6, 20 (St7) lw St8, 10 (St9) Add Add result Shift left 2 RegDst Branch MemRead Instruction Control ALUO Mem RegWrite Instruction [25-21] Read PCRead PCaddress register 1 Read |Read i nstruction [20-16] data 1 Zero register 2 Write Read (31-0 ALU ALUAdd Read ress data Instruction Instruction [15-111register result memory Write data Registers Write Data data memory Instruction [15-0 16 Sign- ALU control extend Instruction [5-0] ALU Control Value Instruction beg St1, ?t2, 100 slt $t3, $t4, St5 sw $t6, 20 ($t7) lw $t8, 10 ($t9)

Explanation / Answer

1)

ALU Control value for

i) beq $t1, $t2, 100

beq for branch eaqual instruction and compare the operands read from the Register File during decode for equality. It's control value is 110

ii) slt $t3, $t4, $t5 .

slt is a R type and is used to set for less than value. It's control value is 111

iii) sw $t6, 20($t7)

sw is used for storing operation. It's control value is 010

iv) lw $t8, 10 ($t9)

lw is used for loading the data into destination register. It's control value is 010.

1 question at a time please.