• 100% Satisfaction Guarantee
Matt Smith, Computer Software Engineer
Category: Programming
Satisfied Customers: 9
Experience:  Software Developer at Autodesk, Inc (6+ years)
13181439
Matt Smith is online now

# how to convert machine language to MIPS assembly

### Customer Question

10101101001010100000000000000000

Submitted: 7 years ago.
Category: Programming
Expert:  Danny B replied 7 years ago.

Sorry didn't read this correctly - opting out.

Danny

Edited by Danny B on 2/23/2010 at 7:06 PM EST
Expert:  Matt Smith replied 7 years ago.

http://www.scribd.com/doc/3577342/MIPS-Assembly-Language-Programming

Go to Appendix C: "Integer Instruction Set". Also, for determining which register name corresponds to a given number, see Figure 1.2.

http://www.d.umn.edu/~gshute/spimsal/talref.html

--------------------------------------------

Now, specifically for the instruction you gave:

10101101001010100000000000000000

This can be split up as follows:

101011|01001|01010|0000000000000000

The first 6 digits specify the opcode: 101011 refers to the "Store Word" instruction or sw. So we're looking at something like:

sw rt offset(rs)

where the register rs is specified by the 5 bits after the opcode:

01001

This binary number corresponds to 9 in decimal. Looking at Figure 1.2, the register's name for 9 is \$t1

and the register rt is specified by the 5 bits after that:

01010

This binary number corresponds to 10 in decimal. Looking at Figure 1.2, the register's name for 10 is \$t2

The remaining 16 bits are the "immediate" or offset.

Thus, the assembly for this machine instruction would be

sw \$t2, 0(\$t1)

Register File (Figure 1.2):

Please let me know if you'd like additional clarification or if you have any questions.

Thanks,

- Matt

Matt Smith, Computer Software Engineer
Category: Programming
Satisfied Customers: 9
Experience: Software Developer at Autodesk, Inc (6+ years)