Quadruple
It contains 4 fields:
- Operator
- Argument 1
- Argument 2
- Result
Drawback:
It requires more no of temporary variables so that it requires more space in the symbol table To avoid this we use a triple add code representation.
| Operator | Arg 1 | Arg 2 | Request | |
| 0 | + | x | y | t1 |
| 1 | / | a | b | t2 |
| 2 | * | t1 | t2 | S |
Triple
It has 3 arguments:
- Operator
- Argument 1
- Argument 2
| Address | Operator | Arg 1 | Arg 2 |
| 0 | + | x | y |
| 1 | / | a | b |
| 2 | * | 0 | 1 |
Indirect Triple
The indirect triple has add pointing to position or pointed index
| Address | Pointed Index | Address | Operator | Arg 1 | Arg 2 | |
| 1000 | 0 | 0 | + | x | y | |
| 1001 | 1 | 1 | / | a | b | |
| 1002 | 2 | 2 | * | 0 | 1 |
Reference Link
