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 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...
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) {...
i need code in javascript or htmlt convert 0 to 999 numbers into word
i need code in javascript or htmlt convert 0 to 999 numbers into word
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...
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...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT