Question

In: Computer Science

I NEED THIS COMPLETED IN MARS 4.5 Six instructions are shown below. Convert each of these...

I NEED THIS COMPLETED IN MARS 4.5

Six instructions are shown below. Convert each of these instructions into machine code and write your final answer in hexadecimal form.

The six instructions are -

  1. add $t0, $s0, $s1
  2. lw $t0, 0x20($t7)
  3. addi $s0, $0, −10
  4. addi $s0, $0, 73
  5. sw $t1, −7($t2)
  6. sub $t1, $s7, $s2

Solutions

Expert Solution

I concerted each instruction given into machine code using MARS 4.5:

1.add $t0, $s0, $s1 : Machine code = 0x02114020

2.lw $t0, 0x20($t7): Machine code = 0x8de80020

3.addi $s0, $0, −10 : Machine code = 0x2010fff6

4.addi $s0, $0, 73   : Machine code = 0x20100049

5.sw $t1, −7($t2)   : Machine code = 0xad49fff9

6.sub $t1, $s7, $s2 : Machine code = 0x02f24822

Running all instructions at a time:


Related Solutions

I NEED PART 2 COMPLETED I ALREADY COMPLETED 1A-D COURSE PROJECT 1 INSTRUCTIONS You have just...
I NEED PART 2 COMPLETED I ALREADY COMPLETED 1A-D COURSE PROJECT 1 INSTRUCTIONS You have just been contracted as a new management trainee by Earrings Unlimited, a distributor of earrings to various retail outlets across the country. In the past, the company has done very little in the way of budgeting and at certain times of the year has experienced a shortage of cash. Since you are well trained in budgeting, you have decided to prepare a master budget for...
i need a pseudocode for a program in java that will convert dollars into euros and...
i need a pseudocode for a program in java that will convert dollars into euros and japanese yen using the print and prinln methods an if, if -else, statement a switch statement a while statement utilizes the file class uses the random class and random number generator and uses at least three methods other than main
I need step by step instructions of inserting these into a heap. this, is, the, house,...
I need step by step instructions of inserting these into a heap. this, is, the, house, that, jack, built. They should be inserted in this sequence. THen swap the first and last variables and do it again. I know the answer is suppose to be but not sure how I'm suppose to get that answer.    2nd iteration would be.   built, is, the house, that jack, this. I know the ansers in array format would be just keep getting it...
Hello, I need to convert this java array into an array list as I am having...
Hello, I need to convert this java array into an array list as I am having trouble please. import java.util.Random; import java.util.Scanner; public class TestCode { public static void main(String[] args) { String choice = "Yes"; Random random = new Random(); Scanner scanner = new Scanner(System.in); int[] data = new int[1000]; int count = 0; while (!choice.equals("No")) { int randomInt = 2 * (random.nextInt(5) + 1); System.out.println(randomInt); data[count++] = randomInt; System.out.print("Want another random number (Yes / No)? "); choice =...
I need an idea of Java code that will convert an integer (1 to 3,999) into...
I need an idea of Java code that will convert an integer (1 to 3,999) into roman numerals using if statements; arrays and loops sadly aren't allowed and that's all I can come up with.
C++ Hello .I need to convert this code into template and then test the template with...
C++ Hello .I need to convert this code into template and then test the template with dynamic array of strings also if you can help me move the function out of the class that would be great.also There is a bug where the memory was being freed without using new operator. I cant seem to find it thanks in advance #include using namespace std; class DynamicStringArray {    private:        string *dynamicArray;        int size;    public:   ...
I need to convert the following into C++. The general idea is to create an application...
I need to convert the following into C++. The general idea is to create an application that can support 10 ID's and 10 grades. It needs to calculate the grade average of said ID, and determine if it is an below or above a certain average, ergo A or C. string[10] studentIDArray int[10] gradeArray int averageGrade for(int i = 0; i < gradeArray; i++) { averageGrade += gradeArray[i] } averageGrade = averageGrade / sizeof(gradeArray) for(int i = 0; i <...
I have a decimal fraction: 76.234567x10^-14 I need to convert this number to binary. I know...
I have a decimal fraction: 76.234567x10^-14 I need to convert this number to binary. I know you can multiply the number by 2 constantly to get the binary number, but that will take forever to do, even converting it to hex with x16 takes a long time, is there any easier way to convert this? Show all steps and work please.
The cost of a typical basket of consumer goods is shown below for six ( 6...
The cost of a typical basket of consumer goods is shown below for six ( 6 ) years. Year Cost of Basket Year Cost of Basket 1 $ 175 4 $ 211 2 $ 183 5 $ 225 3 $ 193 6 $ 236 Required: Calculate the following: 1. The CPI for each year, and the rate of inflation for years 2, 3, 4, 5 and 6. In doing this students with the last name starting with, A to C...
Instructions: After you have completed the calculations on your spreadsheet that correlates to the questions below,...
Instructions: After you have completed the calculations on your spreadsheet that correlates to the questions below, you will copy and paste the portion of that spreadsheet into the Word document for each of the questions. Be sure to also provide a sentence that explains the solution. To save for her newborn son ’s college education, Lea Wilson will invest $1,000 at the end of each year for the next 20 years. The interest rate is 10%. What is the future...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT