Quadruples:
(a, +, b, t1) (c, +, d, t2) (t1, *, t2, t3) (a, +, b, t4) (t4, +, c, t5) (t3, -, t5, result)
Triples:
(a, +, b, t1) (c, +, d, t2) (t1, *, t2, result)
Indirect Triples:
(a, +, b, t1) (c, +, d, t2) (t1, *, t2, t3) (a, +, b, t1) (t1, +, c, t5) (t3, -, t5, result)
In Quadruples, we have a left and right operand and operation and a temporary variable to store the value. In Triples, we have the same but without temporary variable, the result is stored in the same place as one of the operand. Indirect Triples are similar to Triples but with an extra line of code where we use the temporary variable of Quadruples as one of the operand in the expression.