Decode MIPS Hexadecimal Instruction

Posted on 2005-04-23
Last Modified: 2012-05-05
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 !
Question by:srihari1986
    LVL 22

    Expert Comment

    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


    Author Comment

    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

    Binary - 001111
    Decimnal - 15
    MIPS - lui

    Binary - 00000
    Decimnal - 0
    MIPS - $zero

    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.


    Author Comment

    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 !
    LVL 22

    Accepted Solution

    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.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    These days socially coordinated efforts have turned into a critical requirement for enterprises.
    Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now