Numerical representation
. a or b and not c
t 1 = not c
t2 = b and t1
t3 = a or t2
. relational expression a < b is equivalent to
if a < b then 1 else 0
1. if a < b goto 4.
2. t = 0
3. goto 5
4. t = 1
5.
Consider the implementation of Boolean expressions using 1 to denote true and 0 to denote false. Expressions are evaluated in a manner similar to arithmetic expressions.
For example, the three address code for a or b and not c is:
t1 = not c
t2 = b and t1
t3 = a or t2
|