Decode MIPS Hexadecimal Instruction

Hi All,

I there any way i can decode the below to find the MIPS instruction.Because i have done the decoding my self.But i am not sure whether this is correct or not.Is there any program that can decode this kind of set of instruction.

Memory address(in hexadecimal)                                  MIPS 32-bit instruction(in hexadecimal)
0x400024                                                                     0x3c04abcd


Thanks !
srihari1986Asked:
Who is Participating?
 
grg99Commented:
I decoded it by looking at a op code table for the MIPS instruction set.

What you  really need is what is called a disassembvler.  Go to google and type "MIPS disassembler"... there are several ones out there it seems for free.

0
 
grg99Commented:
Can you tell us why you want to know this?  

If this is the address of a program crash, knowing the opcode isnt going to help very much.

Just offhand it looks like a:  LUI   4,0xABCD




0
 
srihari1986Author Commented:
Hi grg99,

Actually i have a question where i need to Decode the instructions.And need to show them the steps on how to decode.I have done the belwo but i need to check what i am doing os correct or no.

0011     1100     0000    0100    1010    1011   1100    1101
-----      -----      -----     -----     -----    -----     -----    -----
3           C           0          4         A        B           C       D


Opcode =>
Binary - 001111
Decimal - 15
The instruction is LUI


001111              000000                     00100          1010101111001101
---------             ----------                  ---------         ----------------------
op                       rs                              rt                      Offset Address



Opcode
Binary - 001111
Decimnal - 15
MIPS - lui

RS
Binary - 00000
Decimnal - 0
MIPS - $zero

RT
Binary - 00100
Decimnal - 4
MIPS - $a0

Offset Address
Binary - 1010101111001101
Decimal = 43981
Mips 43981

ANd at last i need to find the MIPS instruction using the above.Which i am very confused and cannot really get the solution for this.And i am not sure about the Offset Address side also.

ANd the offset field into real address tag using the Memory Address provided.As there is a set of machine codes i need to deecode.


Thanks!
0
 
srihari1986Author Commented:
Hi grg99,


Can i know how do u come out with the LUI   4,0xABCD.As the answer for me is differnt.Is there any software i can use to get this figure.

Actually below is the machine code that is used to craete the program.

Memory address (in hexadecimal)                MIPS 32-bit instruction(in hexadecimal)
0x400024                                                   0x3c04abcd
0x400028                                                   0xac1dffec
0x40002c                                                   0x0c100009
0x400030                                                    0x1047fffc
0x400034                                                    0x03e00008

I have done the calculations for all.I just need the answer to verify it.Please help me on this , as soon as possibe.


Thanks !
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.