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

The following page has a small copy routine written in MIPS Assembly Language. P

ID: 3754208 • Letter: T

Question

The following page has a small copy routine written in MIPS Assembly Language. Please fill in the spaces in the table as my example shows: Please use decimal values for the OpCode row, and Hex digits for the Instruction rows. Use your Green Card to lookup the required values. Location Counter Progranm Counter 12 Opcode| Rs o / 32 22 17 Rd 12 Rt Immediate field 17 000000 10110 10001 01100 00000 100000 32 02D1 6020 36 Additionally, use the Left margin to keep track of the Location Counter, and the right margin to note the value that would be in the Program Counter. The initial value of the Location Counter should be zero. The first instruction below is worked.

Explanation / Answer

PLEASE FIND THE BINARY AND HEX CONVERSION FOR THE INSTRUCTIONS:

ADDI $V0 $ZERO 0
Binary: 00100000000000100000000000000000
Hex: 0x20020000


LW $t1 0x0 $a0
Binary: 10001100100010010000000000000000
Hex: 0x8C890000


addi $v0 $v0 0x1
Binary: 00100000010000100000000000000001
Hex: 0x20420001

sw $t1 0x0 $a1
Binary: 10101100101010010000000000000000
Hex: 0xACA90000

addi $a0 $a0 0x4
Binary: 00100000100001000000000000000100
Hex: 0x20840004

addi $a1 $a1 0x4
Binary: 00100000101001010000000000000100
Hex: 0x20A50004


bne $t1 $zero 0x4(Next) next having address 4
Binary: 00010101001000000000000000000100
Hex: 0x15200004


jr $ra
Binary: 00000011111000000000000000001000
Hex: 0x03E00008

---------------------------------------------------END---------------------------------------------------