x = y + z is a three address code.
No. It's a 4 address code.
Usually, the "three" means we have to consider a register variable or temporal variable, additionally.
A possible equivalent could be:
y = <some value>
z= <some value>
T1 = z
T1 += y
x = T1
Some developers use a assembler like syntax:
Move y, <some value>
Move z, <some value>
Move T1, z
Add T1, y
Move x, T1
As you may know, some important things to consider in order to use intermediate code, (or three address code expressions) :
"Three" means the limit, not rule, there can be less, like one or two operands.
x++;
x = y;
x = y + z;
Start thinking with constants, numbers, or variables as "location (s)", each operand or address code ("P.O. Box"), represents a place in a computer's memory.
Unleast one of the variables, is a destination location of the result.
w = a * 2;
That same destination variable can be used as a source operand.
x = x * y;
y = y + 1;
Three address code expressions, are short mathematical expressions, that are written, similar, to commonly used expressions, but, with lesser elements, because there meant to be translated to assembly code.
Besides usings not just, 1, 2 or 3 locations, is that some operations, cannot be done, in any location, usually the temporal variables represent a CPU register.