Computer Science, asked by trigonclasses, 1 year ago

write the instructions to execute expression (A*B)+(C*D) using 0-address machine

Answers

Answered by Anonymous
2
A guidance is of different length relying on the quantity of addresses it contain. By and large CPU association are of three sorts based on number of location fields:

1.) Single Accumulator association .

2.) General enlist association .

3.) Stack association .

In first association activity is finished including an exceptional enlist called gatherer. In second on different registers are utilized for the calculation reason. In third association the work on stack premise activity because of which it doesn't contain any location field .

⏺️Zero Address Instructions –

A stack based PC don't utilize address field in instruction.To assess an articulation first it is changed over to respect Polish Notation i.e. Post settle Notation.

⏺️One Address Instructions –

This utilization an inferred ACCUMULATOR enroll for information manipulation.One operand is in collector and other is in enlist or memory location.Implied implies that the CPU definitely realize that one operand is in aggregator so there is no compelling reason to determine it.

⏺️Two Address Instructions –

This is normal in business computers.Here two location can be indicated in the instruction.Unlike before in one location guidance the outcome was put away in collector here outcome taxi be put away at various area as opposed to simply aggregator, yet require progressively number of bit to speak to address.
Answered by Arslankincsem
1

Solution: Expression: X = (A + B) * (C + D). Postfixed: X = AB + CD + .


TOP means top of stack. M[X] is any memory location.


The stack does not use the address field in the instruction.


In order to evaluate it, it is firstly converted to the revere Polish Notation also known as Post fix Notation.

Similar questions