71,830 views
23 votes
23 votes
For the following machine code expressed in hexadecimal, write the corresponding MIPS assembly instruction. Note: in case of branch or jump instructions, you should write the target address in hexadecimal notation in the MIPS assembly instruction. e.g., j 0x00000016.

Machine code:0x08100008
Assembly instruction:??

User Mackross
by
3.0k points

2 Answers

9 votes
9 votes

.......................................................................................................................................................................

User Mahmud Ahsan
by
3.1k points
15 votes
15 votes

Answer:

Assembly instruction is j 0x00400020

Step-by-step explanation:

j 0x00400020

EXPLAINATION-

GIVEN Machine Code = 0x 0 8 1 0 0 0 0 8

Step 1:

Now convert 0 8 1 0 0 0 0 8 Each digit to Binary

= 0000 1000 0001 0000 0000 0000 0000 1000

= 000010 00000100000000000000001000

000010 is opcode of j instruction

we are left with

0000 0100000000000000001000

Step 2:

Add two zeroes to right

0000 0100 0000 0000 0000 0010 0000

Step 3:

Remove 4 highest bit

0100 0000 0000 0000 0010 0000

Decimal of it is 4194336

Step 4:

Now convert it into Hexadecimal

we get 400020

So Assembly instruction is j 0x00400020

j 0x00400020

User Siliconeagle
by
2.3k points