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...
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 need to complete this C++ program. The instructions are in the comments inside the code...
I need to complete this C++ program. The instructions are in the comments inside the code below: ------------------------------------------------------------------------- Original string is: this is a secret! Encypted string is: uijt!jt!b!tfdsfu" Decrypted string is: this is a secret! //Encoding program //Pre-_____? //other necessary stuff here int main() { //create a string to encrypt using a char array cout<< "Original string is: "<<string<<endl; encrypt(string); cout<< "Encrypted string is: "<<string<<endl; decrypt(string); cout<<"Decrypted string is: "<<string<<endl; return 0; } void encrypt(char e[]) { //Write implementation...
I need an adjusted trial balance for this question. Here are the instructions, the journal, and...
I need an adjusted trial balance for this question. Here are the instructions, the journal, and the unadjusted trial balance. Palisade Creek Co. is a merchandising business that uses the perpetual inventory system. The account balances for Palisade Creek Co. as of May 1, 2019 (unless otherwise indicated), are as follows: 110 Cash $ 83,600 112 Accounts Receivable 233,900 115 Merchandise Inventory 624,400 116 Estimated Returns Inventory 28,000 117 Prepaid Insurance 16,800 118 Store Supplies 11,400 123 Store Equipment 569,500...
can you please convert this python code into java? Python code is as shown below: #...
can you please convert this python code into java? Python code is as shown below: # recursive function def row_puzzle_rec(row, pos, visited):    # if the element at the current position is 0 we have reached our goal    if row[pos] == 0:        possible = True    else:        # make a copy of the visited array        visited = visited[:]        # if the element at the current position has been already visited then...
i need to convert decimal to twos complement binary and then add the binary digits but...
i need to convert decimal to twos complement binary and then add the binary digits but I am unable to do it. I am only allowed to use string, can anyone help me out please. i need the code urgently. #include #include #include #include using namespace std; string reverse(string s) { string x = ""; for (long i = s.length() - 1; i >= 0; i--) { x += s[i]; } return x; } string twosComplementStringsAddition(string A, string B) {...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT