Question

I have a MIPS reference sheet if you could explain the solution that would be much...

I have a MIPS reference sheet if you could explain the solution that would be much appreciated.

Convert the following MIPS code to hexadecimal machine code:

sub $10, $8, $6

slt $1, $9, 2

Homework Answers

Answer #1
1)  sub $10, $8, $6
=>  SPECIAL    rs rt rd 0  SUB
=>  SPECIAL    $8 $6 $10    0  SUB
=>  000000 01000  00110  01010  00000  100010
let's convert 00000001000001100101000000100010 to hexadecimal
Converting 00000001000001100101000000100010 to hexadecimal
0000 => 0
0001 => 1
0000 => 0
0110 => 6
0101 => 5
0000 => 0
0010 => 2
0010 => 2
So, in hexadecimal 00000001000001100101000000100010 is 0x01065022
Answer: 0x01065022

2)  slt $1, $9, $2
=>  SPECIAL    rs rt rd 0  SLT
=>  SPECIAL    $9 $2 $1 0  SLT
=>  000000 01001  00010  00001  00000  101010
Converting 00000001001000100000100000101010 to hexadecimal
0000 => 0
0001 => 1
0010 => 2
0010 => 2
0000 => 0
1000 => 8
0010 => 2
1010 => A
So, in hexadecimal 00000001001000100000100000101010 is 0x0122082A
Answer: 0x0122082A
Know the answer?
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
Similar Questions
Question 1. Answer the following questions on MIPS Instruction Set. a) Show the minimal sequence of...
Question 1. Answer the following questions on MIPS Instruction Set. a) Show the minimal sequence of MIPS instruction for the following pseudocode segment: A[3] = A[10] + B; Assume that B corresponds to register $t3 and the array A has a base address of 1000C41016 which is required to be loaded to register $t0 in your code. Provide comments for each line of your MIPS instruction. b) Assume that Loop starts at memory location 0xC010. Provide a) instruction format of...
Can i get the answer to these questions in detail explaining how you go to the...
Can i get the answer to these questions in detail explaining how you go to the solution 1.Convert to/from Hex (0) 2.Octal Binary Unsigned/ 2’s complement 3.Understand how to shift and rotate. 4.Understand the relationship between shifting and multiplication/division 5.Be able to recognize and use the following gates: AND OR NOT NAND NOR XOR 6.Understand how a half adder works Given a logical statement ((A OR B) AND NOT(C OR A)) show the gates. 7.What is the difference between an...
If you have you have 30% solution of glucose and you want to make a solution...
If you have you have 30% solution of glucose and you want to make a solution of 3% how would you do it? A. Add 1 ml of 30% glucose to 10 ml of water B. Add 1 ml of 30% glucose to 22 ml of water C. Add 1 ml of 30% glucose to 18 ml of water D. Add 1 ml of 30% glucose to 9 ml of water I could use some help with this question.
Create a JAVA program to display the numbers 1-10. Although you could program a solution that...
Create a JAVA program to display the numbers 1-10. Although you could program a solution that has ten lines of code like the following, think about why this would be a bad idea when developing a programming solution: Print 1 Print 2 Print 3 Print 4 (continued to Print 10) Note: Examples for Java programs (Loop and no loop) programs are in the "Important Documents" folder / Module 6.
Oh, and could you please show your work in as much detail as possible. I already...
Oh, and could you please show your work in as much detail as possible. I already kinda know the answer, I just want to see how you get it. Thank you so much!!! Edit: Thank you so much for trying to help me but I figured it out but I would appreciate your help in the following question. Thank You! One hundred identical mortgages are pooled together into a pass-through security. Each mortgage has a $100,000 principal, a fixed interest...
  6. How much would I have in the bank at the end of 30 years if...
  6. How much would I have in the bank at the end of 30 years if I put $500 a year into an account and the interest rate was 4%. Show all work. 7. Use Benefit cost ratio analysis to determine the best alternative. Each alternative has an 6 year useful life. Assume 15% MARR. Show all work. A                     B                     C First cost                                 $560                $340                $120 Annual Benefit                        $140                $100                $40 Salvage                                    $40                  $0                    $0 8. Kruber company located Tennessee...
I have all of the info filled out, this is a lab. Could someone graph the...
I have all of the info filled out, this is a lab. Could someone graph the analysis and answer the questions below please!!!! Boyle’s Law Trial Pressure (atm) Length (nm) 1 0.76 9 2 0.83 8 3 0.94 7 4 1.12 6.5 5 1.25 6 6 1.38 5.5 7 1.58 5 8 1.68 4 9 1.92 3.5 10 2.15 3 Charles’ Law Trial Temperature (K) Length (nm) 1 57 8.6 2 46 7.2 3 37 6.2 4 35 5.7 5...
Write the following program in MIPS: a) declare an array A of the following numbers: 3,...
Write the following program in MIPS: a) declare an array A of the following numbers: 3, 5, 8, 10, 12, 2, 76, 43, 90, 44 b) declare a variable called size which stores the number of element in array A, that is 10. c) write a subroutine to search for a number stored in an array and return true or false. In C++ the subroutine is as follows: search(array, size, number_To_Search) e.g. search(A, 10, 12) The subroutine should return 0...
Calculate how much you would have in 10 years if you saved $2,000 a year at...
Calculate how much you would have in 10 years if you saved $2,000 a year at an annual rate of 10 percent per year? (assume annual compounding) Below is what I have calculated: 2K + Interest Years 10% Interest EOY Total Saved per Year 2000 $     2,200.00 Year 1             200.00 $    2,200.00 $     4,200.00 Year 2             420.00 $    4,620.00 $     6,620.00 Year 3             662.00 $    7,282.00 $     9,282.00 Year 4             928.20 $ 10,210.20 $   12,210.20 Year...
I have a list of things for review in C programming, could you please give me...
I have a list of things for review in C programming, could you please give me an example and a brief explanation for each question... Thank you very much 5. Create functions that can return pointers or functions that can return structs 6. Analyze code that uses predefined strings such as  strlen, strcat, strncat, and  strtok 7. Create syntax that can perform file input and output 8. Distinguish between array and pointer notation and use both in syntax