different levels are referred to as the stack levels, i.e., stack level 1, stack level 2, etc.
Basically, what RPN means is that, instead of writing an operation such as 3 + 2, in the calculator by using
3+2`
we write first the operands, in the proper order, and then the operator, i.e.,
3`2`+
As you enter the operands, they occupy different stack levels. Entering 3`puts the number 3 in stack level 1. Next, entering 2`pushes the 3 upwards to occupy stack level 2. Finally, by pressing +, we are telling the calculator to apply the operator, or program, + to the objects occupying levels 1 and 2. The result, 5, is then placed in level 1.
Let's try some other simple operations before trying the more complicated expression used earlier for the algebraic operating mode:
123/32 | 123`32/ |
42 | 4`2Q |
3√(√27) | 27`R3@» |
Notice the position of the y and the x in the last two operations. The base in the exponential operation is y (stack level 2) while the exponent is x (stack level 1) before the key Q is pressed. Similarly, in the cubic root operation, y (stack level 2) is the quantity under the root sign, and x (stack level 1) is the root.
Try the following exercise involving 3 factors: (5 + 3) × 2
5`3`+ | Calculates (5 +3) first. |
2X | Completes the calculation. |
Let's try now the expression proposed earlier:
Page