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

What are the assembly language instruction corresponding to the following MIPS m

ID: 3907763 • Letter: W

Question

What are the assembly language instruction corresponding to the following MIPS machine language instructions: a) 000000 01001 10010 01100 00000 101010- 31 11 10 6 5 26 25 21 20 rs rs 16 15 opcode opcode opcode rt rt shamt immediate I-type target J-type Load and Store Instructions signed offset signed offset signed offset signed offset signed offset signed offset signed offset signed offset LB rt, offset(rs) LH rt. offset(rs) LW rt, offset (rs) LBU rt, offset (rs) LHU rt, offset (rs) SB rt, offset (rs) SH rt, offset (rs) SW rt, offset (rs) dest dest dest 100000 base 100001 100011 100100 100101 101000 101001 101011 base dest dest dest ase base ase dest

Explanation / Answer

Answer is as follows :

a) 00000 01001 10010 01100 00000 101010

According to given instruction table opcode and Funct is match with R-type instruction SLT.

i.e. SLT rd,rs,rt.

So according to format of R-type instruction the

000000 is opcode

rs is 01001 i.e. $9 in decimal

rt is 10010 i.e. $18 in decimal

rd is 01100 i.e. $12 in decimal

shamt is 00000

funct is 101010

so full instruciton is

SLT $12,$9, $18 and according to register table of MIPS it is equal to SLT $t4, $t1, $s2.

b) 100011 00001 00010 11111 11111 111100

According to given instruction table opcode and Funct is match with Load and Store instruction LW.

i.e. LW rt,offset(rs)

So according to format of Load and Store instructions the

100011 is opcode

rs(base) is 00001 i.e. $1 in decimal

rt(dest) is 00010 i.e. $2 in decimal

11111 11111 111100 is offset i.e. 65532 in decimal

So full instruction is

LW $2,65532($1) and according to register table of MIPS it is equal to LW $v0, 65532($at)

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

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