Computer Science, asked by malikmohsn746, 9 months ago

Write assembly code for 2-address and 3-address machines to evaluate the given expression z = x2 - 3xy + 2(x/y) + y2

Answers

Answered by tanishkajaguri
0

Answer:

Computer Organization | Instruction Formats (Zero, One, Two and Three Address Instruction)

Computer perform task on the basis of instruction provided. A instruction in computer comprises of groups called fields. These field contains different information as for computers every thing is in 0 and 1 so each field has different significance on the basis of which a CPU decide what so perform. The most common fields are:

Operation field which specifies the operation to be performed like addition.

Address field which contain the location of operand, i.e., register or memory location.

Mode field which specifies how operand is to be founded.

A instruction is of various length depending upon the number of addresses it contain. Generally CPU organization are of three types on the basis of number of address fields:

Single Accumulator organization

General register organization

Stack organization

In first organization operation is done involving a special register called accumulator. In second on multiple registers are used for the computation purpose. In third organization the work on stack basis operation due to which it does not contain any address field. It is not necessary that only a single organization is applied a blend of various organization is mostly what we see generally.

Similar questions