In C expressions things which are worked on are called operands and the things which do the working are called operators. An operand is either a constant, in which case it is given as a plain number, or a variable, in which case it is given by the name of the variable concerned.

    a = b + c * 2 ;

In the above C statement the operands are the variables b and c along with the constant value 2. The operators are + and *. Note that a is not an operand, it is the destination of the assignment which is being performed. However, there is no reason why the destination cannot be used in the expression:

    count = count + 1 ;

You might not like the look of this, in that we are using a value in the expression which is also the destination of the assignment. However, this is quite OK. Remember that the first thing that happens is that the expression is calculated. Then its value is placed in the destination variable.

You will see statements like the one above quite frequently in C programs. In the case above the result is that the value in count will get one larger.

The usual range of arithmetic operators is provided, with +, -, * and / (note the use of * rather than x for multiply). Remember that the PICmicro is not a hugely powerful processor and so will not be able to perform divisions particularly quickly.

See if you can list the operators and operands in the program in the CPIC on the right.