1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
lorasvet [3.4K]
3 years ago
14

Write a program to do the following: Load $t0 with 12 and call it x. Load 21 in $t1 and denote it as y. Finally, load 32 in $t2

and refer to it as z. Now, compute 3x2 10y 5z. Output the result using syscall 1 (remember the result has to be in $a0). Write down the output number on your answer sheet.
Computers and Technology
1 answer:
ELEN [110]3 years ago
3 0

Answer:

addi $t0, $zero, 12

addi $t1, $zero, 21    

addi $t2, $zero, 32    

addi $t3, $zero, 3

mul $t3, $t3, $t0

mul $t3, $t3, $t0  

addi $v, $zero, 10

mul $v, $v, $t1  

addi $w, $zero, 5

mul $w, $w, $t2  

add $a0, $t3, $v

add $a0, $a0, $w

addi $v0, $zero, 1

syscall

Explanation:

  • Use the addi statement to initialize the t0, t1 and t2 variables with a 0 value.
  • Use the mul statement to multiply the t0 with t3 and then multiply variable v with t1.
  • Use the add statement to add the variable v with t3 and assign the result to a0 variable.
  • Use the add statement to add the variable w with a0 and assign the result to a0 variable.

You might be interested in
Which of the following is an example of a consumer service? computer builder motorcycle manufacturer cabinet maker air condition
Zanzabum
Motorcylce manufacturer
6 0
3 years ago
Read 2 more answers
Create a program that includes a function called toUpperCamelCase that takes a string (consisting of lowercase words and spaces)
astraxan [27]

Answer:

#include<iostream>

using namespace std;

//method to remove the spaces and convert the first character of each word to uppercase

string

toUpperCameICase (string str)

{

string result;

int i, j;

//loop will continue till end

for (i = 0, j = 0; str[i] != '\0'; i++)

{

 if (i == 0)       //condition to convert the first character into uppercase

  {

  if (str[i] >= 'a' && str[i] <= 'z')   //condition for lowercase

  str[i] = str[i] - 32;   //convert to uppercase

  }

if (str[i] == ' ')   //condition for space

  if (str[i + 1] >= 'a' && str[i + 1] <= 'z')   //condition to check whether the character after space is lowercase or not

  str[i + 1] = str[i + 1] - 32;   //convert into uppercase

if (str[i] != ' ')   //condition for non sppace character

  {

  result = result + str[i];   //append the non space character into string

  }

}

//return the string

return (result);

}

//driver program

int main ()

{

string str;

char ch;

//infinite loop

while (1)

{

fflush (stdin);

//cout<< endl;

getline (cin, str);   //read the string

//print the result

//cout<< endl << "Q";

// cin >> ch; //ask user to continue or not

ch = str[0];

if (ch == 'q' || ch == 'Q')   //is user will enter Q then terminatethe loop

  break;

cout << toUpperCameICase (str);

cout << endl;

}

return 0;

}

8 0
3 years ago
Which of the following is not a property of a WAN:
docker41 [41]

Answer:

Option d is the correct answer for the above question.

Explanation:

  • WAN is a type of network that facilities network connection all over the world. It can connect every computer which is in anywhere in the world while the other technology like LAN and MAN is used for small area locations.
  • The above question asked that about that statement which is not the property of WAN and that is option d because it states that WAN is used to connect only small areas of computers, but it can connect all the computers of the world, while the other property is valid for WAN.
6 0
3 years ago
If you’re presenting in a darkened room, what text and background should you use to provide maximum readability?1) Light text on
ludmilkaskok [199]

Answer:

1

Explanation:

1 because it would be difficult for people to read on the other ones that you put.

3 0
3 years ago
I wish we could visit Paris for the holidays into exclamatory​
shusha [124]

Answer:

wdym

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • Which of these statements is true? Steve Jobs invented the mouse as an input device. Bill Gates invented the mouse as an input d
    6·1 answer
  • Write a program with a function that accepts a string as an argument and returns a copy of the string with the first character o
    11·1 answer
  • Describe how data center storage applications drive the development of SAN technology.
    8·1 answer
  • The smallest building block of a wireless lan is a ______.
    5·1 answer
  • The ash and dust from a volcanic eruption can cause a ______ change in the environment.
    8·1 answer
  • Write a program that first reads in the name of an input file and then reads the input file using the file.readlines() method. T
    7·1 answer
  • Anyone has any ideas for a gaming setup i can buy for christmas. Something with high framing rates (monitor included) for about
    15·1 answer
  • Saitama And Tatsumaki Both Go Shopping Together ,Both have Have 50 loafs of bread , And Saitama takes 43 , How much do Tatsumaki
    14·1 answer
  • Ssssssssssssssssssssssssssssssssssssssssssssssssss 100 points for this answer too.
    10·1 answer
  • What are backup storage devices of computer? Why are they necessary in the computer system?​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!