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
What are the differences between a trap (aka software interrupt) and an interrupt (hardware interrupt)? What is the use of each
Marta_Voda [28]

Answer:

Trap is a software interrupt that occurs when there is a system call, while hardware interrupt occurs when a hardware component needs urgent attention.

Explanation:

Interrupt is an input signal that disrupt the activities of a computer system, giving immediate attention to a hardware or software request.

In trap interrupt, the system activities are stop for a routine kernel mode operation, since it has a higher priority than the user mode. At the end of the interrupt, it switches control to the user mode.

The hardware interrupt is a signal from hardware devices like the input/output devices, storage and even peripheral devices that draws an immediate attention of the processor, stopping and saving other activities and executing the event with an interrupt handler.

6 0
3 years ago
Janeal spends her day looking at the stock and bond markets and evaluating how the portfolios of the businesses she serves will
pychu [463]

Answer:

ur answer good sir will be : financial analyst

and a brainliest will be good to thnx

4 0
3 years ago
If AL contains binary 1000 1111, which one will show the information of the binary bits in AL after performing operation SHR AL,
padilas [110]

Answer:

a) AL will contains 0011 1100

Explanation:

In assembly language, shifting bits in registers is a common and important practice. One of the shifting operations is the SHR AL, x where the x specifies that the bits be shifted to the right by x places.

SHR AL, 2 therefore means that the bits contained in the AL should be shifted to the right by two (2) places.

For example, if the AL contains binary 1000 1111, the SHR AL, 2 operation will cause the following to happen

Original bit =>                                        |   1  |  0 |  0  |  0  |  1 |  1 |  1 |  1 |

Shift once to the right =>                |  1 |   0 |  0  |  0  |  1 |  1 |  1 |  1 | (0) |

Shift once to the right =>          |  1 |  0 |  0  |  0  |  1 |  1 |  1 |  1 | (0) | (0) |

Notice;

(i) that there are two shifts - one at a time.

(ii) that the bits in bold face are the bits in the AL after the shift. Those that in regular face are those in the carry flag.

(iii) that the new bits added to the AL after a shift are the ones in bracket. They are always set to 0.

5 0
3 years ago
Write an algorithm to find perimeter of circle<br>​
Anna11 [10]

Answer:

Here’s one!

Given [math]R[/math], the radius of the circle.

Let [math]N,D\leftarrow 0[/math]

Repeat until [math]D[/math] is large enough (about 1,000,000)

[math]x,y\leftarrow U[0,1][/math]

If [math]x^2 + y^2\le 1[/math] then [math]N\leftarrow N+1[/math]

[math]D\leftarrow D+1[/math]

[math]P\leftarrow\frac{8NR}{D}[/math]

Return [math]P[/math]

[math]U[0,1][/math] is a uniform random number in the range [math][0,1][/math].

Explanation:

6 0
2 years ago
Your mothers date of birth and a unique personal identification number (pin) code provide authentication by _____.
Semenov [28]
Hello <span>Madysonhenders2477 </span><span>

Answer: Your mothers date of birth and a unique personal identification number (pin) code provide authentication by What you are (C)

Since your identification is about who you are, this would be the answer.

Hope This Helps!
-Chris</span>
6 0
3 years ago
Other questions:
  • Consider the code below. Note that the catch statements in the code are not implemented, but you will not need those details. As
    11·1 answer
  • What is the basic purpose of Google calendar?
    14·2 answers
  • Some files appear dimmed in one of the default folders on your computer. What would be the best course of action? A. Leave the f
    5·1 answer
  • Where Can you find 2tickets Universal Studios Horror night
    10·2 answers
  • Write a program to randomly fill an array of float of 10 elements (use the rand() function and make sure to use #include ) in ma
    11·1 answer
  • Which person would be the best fit for a career in the Information Technology field?
    6·2 answers
  • Do you think communities or countries can survive without the internet?why or why not?​
    11·1 answer
  • Which of the following statements about the relationship between hardware and software is true? a) Hardware can be present in in
    9·1 answer
  • Xercise 1<br>1.<br>What is system? Explain the components of system in brief.​
    12·1 answer
  • Which areas of a business would most benefit from using the Workday platform?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!