subject
Computers and Technology, 28.05.2021 02:30 roibeyj

Write an assembly code to implement the y=(x1+x2)*(x3+x4) expression on 2-address machine, and then display the value of y on the screen. Assume that the values of the variables are known. Hence, do not worry about their values in your code. The assembly instructions that are available in this machine are the following:
Load b, a Load the value of a to b
Add b, a Add the value of a to the value of b and place the result in b
Subt b, a Subtract the value of a from the value of b and place the result in b
Mult b, a Multiply the values found in a and b and place the result in b
Store b, a Store the value of a in b.
Output a Display the value of a on the screen
Halt Stop the program
Note that a or b could be either a register or a variable. Moreover, you can use the temporary registers R1 & R2 in your instructions to prevent changing the values of the variables (x1,x2,x3,x4) in the expression.
In accordance with programming language practice, computing the expression should not change the values of its operand.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 13:30
Question 1(multiple choice worth 5 points) (06.04 mc) how are the respiratory and circulatory systems similar? both systems provide glucose and other substances to cells. both systems regulate blood flow throughout the body. both systems remove carbon dioxide from the body. both systems send messages to the nervous system for breathing. question 2(multiple choice worth 5 points) (06.04 lc) the respiratory system controls and the circulatory systems controls antibodies; digestion breathing; blood flow muscles; bones nerves; senses question 3(multiple choice worth 5 points) (06.04 hc) read the following summary, which describes a body process. then, answer the question. blood enters the right side of the heart and travels to the lungs. there, the lungs eliminate carbon dioxide and exchange it for more oxygen. the oxygen-rich blood enters the left side of the heart. then, arteries carry blood away from the heart. what process is being described? circulation excretion immune response respiration question 4(multiple choice worth 5 points) (06.04 lc) the system is responsible for moving blood cells throughout the body. circulatory endocrine immune respiratory question 5(multiple choice worth 5 points) (06.04 mc) which of the following functions as part of the excretory and respiratory systems? blood heart intestines lungs
Answers: 1
question
Computers and Technology, 22.06.2019 21:00
Write a method so that the main() code below can be replaced by the simpler code that calls method original main(): public class calcmiles { public static void main(string [] args) { double milesperhour; double minutestraveled; double hourstraveled; double milestraveled; milesprhour = scnr.nextdouble(); minutestraveled = scnr.nextdouble(); hourstraveled = minutestraveled / 60.0; milestraveled = hourstraveled * milesperhour; system.out.println("miles: " + milestraveled); } }
Answers: 2
question
Computers and Technology, 23.06.2019 10:20
Suppose there is a relation r(a, b, c) with a b+-tree index with search keys (a, b).1. what is the worst-case cost of finding records satisfying 10 < a < 50 using this index, in terms of the number of records n1, retrieved and the height h of the tree? 2. what is the worst-case cost of finding records satisfying 10 < a < 50 and 5 < b < 10 using this index, in terms of the number of records n2 that satisfy this selection, as well as n1 and h defined above? 3. under what conditions on n1 and n2, would the index be an efficient way of finding records satisfying the condition from part (2)?
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
Choose the answers that best complete each sentence. on average,are more expensive than other kinds of postsecondary schools. the cost of room and board includes. to save money, some students attend auniversity in their home state.
Answers: 2
You know the right answer?
Write an assembly code to implement the y=(x1+x2)*(x3+x4) expression on 2-address machine, and then...
Questions
question
Mathematics, 26.11.2021 02:10
Questions on the website: 13722360