edited by
18,730 views
54 votes
54 votes

For computer based on three-address instruction formats, each address field can be used to specify which of the following:

(S1) A memory operand

(S2) A processor register

(S3) An implied accumulator register

  1. Either $S1$ or $S2$
  2. Either $S2$ or $S3$
  3. Only $S2$ and $S3$
  4. All of $S1$, $S2$ and $S3$
edited by

4 Answers

Best answer
62 votes
62 votes

Three address Instruction

Computer with three addresses instruction format can use each address field to specify either processor register or memory operand.

e.g., $X = (A + B) * (C + A)$

Equivalent Three address Instructions$$\begin{array}{ll}
\text{ADD } R1, A, B &    ;\qquad R1 \leftarrow  M [A] + M [B]\\
\text{ADD }R2, C, D & ;\qquad R2 \leftarrow  M [C] + M [D]\\
\text{MUL } X, R1, R2    & ;\qquad M [X] \leftarrow  R1 * R2
\end{array}$$The advantage of the three address formats is that it results in short program when evaluating arithmetic expression. The disadvantage is that the binary-coded instructions require too many bits to specify three addresses.

Correct Answer: $A$

edited by
23 votes
23 votes

option A either A memory operand or  A processor register.

1 votes
1 votes

Option A: (in inst' n never present accumulator register address)

1 votes
1 votes

Ans : A

Classification of Instructions Based on CPU Organisations

Computers may have instructions of several different lengths containing varying number of  addresses. The number of address fields in the instruction format of a computer depends on the internal organization of its registers. Most computers fall into one of the three types of CPU organizations:

(i) Single Accumulator Organization: In this type of organization all operations are performed on an implied accumulator. The instruction format uses only one address field. For example, the instruction that loads the accumulator with the contents of a memory location.

LoadX

Where X is the address of the source operand. This results in the operation AC ÷— M (X). AC is the accumulator and M(X) symbolizes the memory word located at address X.

(ii) General Register Organisation : In this organization, the instruction format needs 2 or 3 register address fields according to the operation.

For example, an instruction for addition may be written as

ADD R1, R2, R3,

It denotes the operation R1 <—R2 -f- R3

The same ADD instruction needs only two register address fields if the destination register is one of the source registers, i.e. if the operation is

R1 R1 + R2

Then the instruction is ADD R1, R2

The instruction may also contain one memory address field and one register address field. For example, the instruction,

ADD R1, X

Specifies the operation R1 —R1 + M [X]

(iii) Stack Organization : In this organization, the computers will have PUSH and POP instructions which require an address field. For Kathplê, the instruction PUSH X will push the word at address Xonto the top of the stack. The operation — type instructions do not need any address field. For example, the instruction

ADD

Consists of only opcode and no address field. It has the effect of popping the top two numbers from the stack, adding them, and pushing the sum onto the stack. Thus all the operands are implied to be in the stack.

Most of the computers fall into one of the above three types of organizations. Some computers combine features from more than one organizational structure.

Answer:

Related questions

80 votes
80 votes
7 answers
1
makhdoom ghaya asked Feb 13, 2015
28,736 views
The least number of temporary variables required to create a three-address code in static single assignment form for the expression $q + r / 3 + s - t * 5 + u * v/w$ is_...