Question

2-If we assume we place the following MIPS code starting at location 8000 in memory, what is the MIPS machine code for this c
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Please find the answer below:

slt $t2,$0,$t0

SLT $t2 $zero $t0 Binary: 00000000000010000101000000101010 Hex: 0x0008502a 2625 SPECIAL $zero 2120 | 16 15 11 10 1 st2 0 1010


bne $t2,$0,ELSE

BNE $t2 $zero 0x0001 Binary: 00010101010000000000000000000001 Hex: 0x15400001 26 25 2120 16 15 5+ 2 BNE 000101 $zero 00000 of


j DONE

Address of done is :

8010 in hex

1000000000010000 in binary

address in 26 bit will be

0000000000001000000000010000

Address with jump instruction is :

00001000000000000010000000000100

it will be in hexadecimal as below

8002004

Jump Format: i target [J-type] MIPS Architecture Extension: MIPS I 2625 target 000010 26


ELSE: addi $t2,$t2,2
ADDI $t2 $t2 0x0002 Binary: 00100001010010100000000000000010 Hex: 0x214 a0002 31 26 25 21 20 16 15 ADDI 001000 10 immediate 0

Add a comment
Know the answer?
Add Answer to:
2-If we assume we place the following MIPS code starting at location 8000 in memory, what...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT