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
How to transfer audio files from computer to android?
fenix001 [56]
U can use Bluetooth connect your computer to the android. <span />
5 0
3 years ago
Discuss your theory on why the light bulbs in the combination circuit have different brightness.
umka21 [38]
I believe lightbulbs have different brightness because of there quality parts that make it. The cheaper they are usually the worse quality. That is my theory.
5 0
2 years ago
Jack's manager asks him to distribute information and an attachment as quickly as possible to all their clients. In one to two s
snow_tiger [21]

Jack must use electronic communication or e-mail to distribute information and an attachment as quickly as possible to all their clients.  In 1–2 sentences, describe what Jack should do. In this way, he can also retain a hard copy of the memo as well as the attachments used for future reference. 



8 0
2 years ago
100 points aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Rina8888 [55]

Answer:

An algorithm enables the programmer to perform a task or mission. So the answer is A. A loop is repeating while a website requires loops and algorithms

3 0
3 years ago
Read 2 more answers
How many instructions could fit into a 256 byte memory unit, given a 32-bit architecture?
andriy [413]

Answer:

64

Explanation:

We have given the 32 bit architecture

We know that 1 byte =8 bit

So memory of given architecture 32 bit \frac{32}{8}=4bytes

Total memory = 256 bytes

So total number of instruction that fit into 256 bytes \frac{256}{4}=64

So total 64 instruction can be fit in 256 byte memory.

3 0
2 years ago
Other questions:
  • What are the advantages of renting a home over buying a home? What are some disadvantages?
    13·1 answer
  • What is a bug?
    11·2 answers
  • Extending the web server functionality implies that the web server and the web-to-database middleware will properly communicate
    10·1 answer
  • How do i do a class in java??
    5·1 answer
  • What do you think was the immediate effect of the introduction of handheld consoles and video games?
    6·1 answer
  • A(n) ____________________ is hardware or software that blocks or allows transmission of information packets based on criteria su
    13·1 answer
  • A software update is also referred to as what?
    15·2 answers
  • How does a computer work
    13·1 answer
  • What commands does SuperKarel know that regular Karel does not?
    11·1 answer
  • Please answer fast computer picture above​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!