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
love history [14]
3 years ago
7

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 th

e 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.
Computers and Technology
1 answer:
Ratling [72]3 years ago
7 0

mbly 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 pla

You might be interested in
According to the presentation, integrity and ethics are particularly important for careers in which of the following pathways?
Aloiza [94]

Journalism and Broadcasting

3 0
3 years ago
Are used in the Excel application to create calculations
OlgaM077 [116]

Answer:

I think the answer is formulas

6 0
3 years ago
Read 2 more answers
An administrator is writing into a database and received an error detailed in the exhibit. What two steps need to be taken to re
d1i1m1o1n [39]

An administrator is writing into a database and received an error detailed in the exhibit. The two steps to be taken to resolve this are :

Move the Execute SQL statement to be between Connect and Disconnect. Move the Prompt Message to be before the Disconnect statements.

Explanation:

  • Dynamic SQL refers to SQL statements that are generated at run-time.
  • To disconnect from a database, in the Database Navigator or Projects view, click the connection and then click the Disconnect button in the toolbar or click Database -> Disconnect on the main menu
  • You can also right-click the connection and click Disconnect on the context menu
  • The PROMPT command may be used to display messages to the user, perhaps supplying a short summary of what your script is going to accomplish.
  • The SQL EXECUTE command executes an SQL command and binds the result to 4D objects (arrays, variables or fields).
  • A valid connection must be specified in the current process in order to execute this command. The sqlStatement parameter contains the SQL command to execute.

7 0
3 years ago
Assume that to_the_power_of is a function that expects two integer parameters and returns the value of the first parameter raise
Bezzdna [24]

Answer:

The statement in python is as follows:

to_the_power_of(cube_side,3)

Explanation:

As stated as the requirement of the code segment, the statement takes as parameters a variable cube_side and a constant 3.

It then returns the volume of the cube; i.e. cube raise to power 3

<em></em>

<em>See full program below</em>

<em>def to_the_power_of(val,powe):</em>

<em>     result = val**powe</em>

<em>     print(result)</em>

<em>cube_side = float(input("Cube side: "))</em>

<em>to_the_power_of(cube_side,3)</em>

4 0
3 years ago
Well this isn't school related, but how do i watch dubbed and subbed anime for free on my computer?
Shtirlitz [24]
Crunchyroll or my anime list. Both of these work.

Hope this helps you

3 0
3 years ago
Read 2 more answers
Other questions:
  • True or false words spelling and grammar check is always %100
    7·2 answers
  • Discuss two advantages and two disadvantages of agile methods
    9·1 answer
  • What are two fundamental components of data structures?
    10·1 answer
  • Many 12-15 yrs hv access to the internet which cannot be supervised by an adult.i need 5 problems tht this might cause
    5·1 answer
  • HELP 11 pointsw to the person who helps me
    11·2 answers
  • " In which software generation did the distinction between systems programmers and other programmers first surface?"
    15·1 answer
  • Which of the following JavaScript expressions is equivalent to the given HTML code? ​ a. Document.getelementbyId("menu1").menu=
    6·1 answer
  • So wait how do i comment on someone's answer because that would be useful ,,.
    9·2 answers
  • Which command is used to copy entire folder structures between volumes or across a network while maintaining all NTFS file permi
    10·1 answer
  • How you use ict today and how will you use it tomorrow
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!