We can get round this problem by giving our processor two separate stacks - one for operators and one for operands (the numbers which the operators work on). The processor knows that each of the operators that we have looked at so far takes two operands, so whenever there are two operands on the operand stack and one operator on the operator stack, then the operation can be carried out.
You probably didn't understand a word of that, so an example is needed to clear the matter up.
![]() Go back |
![]() Main Menu |