Question: 6 (a) Write a MIPS program fragment for the following high-level language statement: B [350]-gt B [350];/ Assume B is an int array with each

 6 (a) Write a MIPS program fragment for the following high-level

6 (a) Write a MIPS program fragment for the following high-level language statement: B [350]-gt B [350];/ Assume B is an int array with each element taking 4 bytes Assume that g is in register Ssland that the base address of the array B is in register Ss2. Assume that registers Ss0 through Ss7 map to register numbers 16 through 23, and registers StO through St7 map to register numbers 8 through 15. Use the instruction format information provided below to convert your instructions in Part (a) to machine language code. First express your machine language code using decimal numbers for the fields and then convert into Binary and eventually into hexadecimal representation for each instruction. (b) Instructions for the program in Part (a) converted into Decimal (c) Conversion of Part (b) into Binary (d) Conversion of Part (c) into Hexadecimal Instruction Format of relevant MIPS instructions 6 bits 5 bits 5 bits 5 bits 5 bits 6 bits add rd, rs, rt rs rt rd 32 6 bits 35 43 5 bits 5 bits 16 bits 16-bit displacement d 16-bit displacement d lw rt, d (rs) rs rt sw rt, d (rs) rs rt

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!