1,005 views

1 Answer

Best answer
4 4 votes

3 adress code

In computer science, three-address code (often abbreviated to TAC or 3AC) is an intermediate code used by optimizing compilers to aid in the implementation of code-improving transformations. Each TAC instruction has at most three operands and is typically a combination of assignment and a binary operator.

3 adress instruction

Computers with three-address instruction formats can use each address field to specify either a processor register or a memory operand. The program in assembly language that evaluates X = (A + B) ∗ (C + D) is shown below, together with comments that explain the register transfer operation of each instruction. ADD R1, A, B R1 ← M [A] + M [B] ADD R2, C, D R2 ← M [C] + M [D] MUL X, R1, R2 M [X] ← R1 ∗ R2 It is assumed that the computer has two processor registers, R1 and R2. The symbol M [A] denotes the operand at memory address symbolized by A. The advantage of the three-address format is that it results in short programs when evaluating arithmetic expressions. The disadvantage is that the binary-coded instructions require too many bits to specify three addresses. An example of a commercial computer that uses three-address instructions is the Cyber 170. The instruction formats in the Cyber computer are restricted to either three register address fields or two register address fields and one memory address field.

• selected by
Position:
Show:

Related questions

1 1 vote
1 answers 1 answer
2.1k
2.1k views
isriram asked Jun 9, 2022
2,147 views
Consider a system which supports only 1-address type instructions. The size of memory the system has is $2^m$ KB. The system supports ' i ' distinct instructions. The len...
14 14 votes
3 answers 3 answers
15.1k
15.1k views
Tehreem asked Sep 9, 2015
15,134 views
A computer uses expanding opcode. It has 16 bit instructions 6 bit addresses, it supports one address, two address instructions only. If there are n two address instructi...
14 14 votes
7 7 answers
2.8k
2.8k views
gatecse asked Feb 23
2,833 views
Consider a processor that has $16$ general purpose registers and it uses $2$-byte instruction format for all its instructions. Variable-sized opcodes are permitted. There...
12 12 votes
5 5 answers
2.1k
2.1k views
gatecse asked Feb 23
2,073 views
Consider a processor $\text{P}$ whose instruction set architecture is the load-store architecture. The instruction format is such that the first operand of any instructio...