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

Consider the following MIPS code: text a main: addi St0, $0, 62 addi $tl, $0, -2

ID: 3723622 • Letter: C

Question

Consider the following MIPS code: text a main: addi St0, $0, 62 addi $tl, $0, -28 addi $t2, $0, 20 addi $t3, S0, 3 add $t4, $tl, $to sub St4, $t4. St2 mult $t3, $t4 mflo St5 div $t5, $t4 mflo $t6 div $t2, $t3 1. Prepare a table where each column corresponds to one of the following registers: PC, HI, LO, So, to, ti, t2, t3, St4, St5 and St6. For each instruction in the MIPS code, write in th table entry: e appropriate the value of the program counter. Note: For line 2, PC has the value oxoo400000. the value of the registers that participate in the instruction, and indicate which register's content changed

Explanation / Answer

Table

Explanation:-

Instruction PC HI LO $0 $t0 $t1 $t2 $t3 $t4 $t5 $t6 addi $t0,$0,62 0x00400000 0 0 0 62(0x0000003e) 0 0 0 0 0 0 addi $t1,$0,-28 0x00400004 0 0 0 62(0x0000003e) -28(0xffffffe4) 0 0 0 0 0 addi $t2,$0,-20 0x00400008 0 0 0 62(0x0000003e) -28(0xffffffe4) 20(00000014) 0 0 0 0 addi $t3,$0,3 0x0040000c 0 0 0 62(0x0000003e) -28(0xffffffe4) 20(00000014) 3(0x00000003) 0 0 0 addi $t4,$t1,$t0 0x00400010 0 0 0 62(0x0000003e) -28(0xffffffe4) 20(00000014) 3(0x00000003) 34(0x00000022) 0 0 sub $t4,$t4,$t2 0x00400014 0 0 0 62(0x0000003e) -28(0xffffffe4) 20(00000014) 3(0x00000003 14(0x0000000e) 0 0 mult $t3,$t4 0x00400018 0 42(0x2a) 0 62(0x0000003e) -28(0xffffffe4) 20(00000014) 3(0x00000003 14(0x0000000e) 0 0 mflo $t5 0x0040001c 0 42(0x2a) 0 62(0x0000003e) -28(0xffffffe4 20(00000014) 3(0x00000003 14(0x0000000e) 42(0x2a) 0 div $t5,$t4 0x00400020 0 3(0x3) 0 62(0x0000003e) -28(0xffffffe4) 20(00000014) 3(0x00000003) 14(0x0000000e) 42(0x2a) 0 mflo $t6 0x00400024 0 3(0x3) 0 62(0x0000003e -28(0xffffffe4) 20(00000014) 3(0x00000003) 14(0x0000000e) 42(0x2a) 3(0x3) div $t2,$t3 0x00400028 2(0x2) 6(0x6) 0 62(0x0000003e -28(0xffffffe4) 20(00000014) 3(0x00000003) 14(0x0000000e) 42(0x2a 3(0x3) mfhi $t6 0x0040002c 2(0x2) 6(0x6) 0 62(0x0000003e) -28(0xffffffe4) 20(00000014) 3(0x00000003) 14(0x0000000e) 42(0x2a) 2(0x2)
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