How RPN Works
RPN and the Stack
The stack is central to the concept of how RPN works. The stack is the large white area that takes up the upper part of the calculator. Every time the user types in some digits and presses "Enter", that number appears as an entry on the stack. Just below the stack and to the right is the register. The register holds numbers that the user is typing and acts as an additional entry on the stack whenever it contains a number that hasn't been put on the stack yet.
Whenever the user enters an operation on the calculator, that operation is applied to the appropriate number of rightmost entries on the stack. For instance, if the user presses "+", the last two entries in the stack are added together, and those two entries are replaced by the addition expression and the addition result. If there is a number in the register when the "+" button is pressed, that number is used as a stack entry, saving the user from having to hit the Enter key before hitting plus. Because the "+" key is pressed at the end of the calculation instead of in the middle, RPN can seem a little backwards at first, but it quickly becomes second nature.
That is all you need to know to start trying RPN. If you want to know why RPN is a better way to operate a calculator, read on.
RPN and Saving Keystrokes (and Errors)
Let's look at the equation:
To enter this on a regular calculator requires the following set of key strokes: " ( 1 + 2 ) / ( 3 * 4 ) = " for a total of 12 keystrokes. Using RPN the keystroke sequence would be: " 1 Enter 2 + 3 Enter 4 * / " for a total of 9 keystrokes.
Note also that on a regular calculator leaving out either set of parentheses will lead to a wrong answer, which is a very common error. Because RPN explicitly includes the order of operations during entry, this kind of error is much less likely. Even better, because Visual RPN Calculator displays the calculation in textbook fashion (the picture above was cut and pasted from the calculator), it is easy to see whether it was entered correctly. But unlike most textbook entry calculators, you don't have to use arrow buttons to move around different parts of the expression - calculation entry is quick and easy.
Additional Advantages to RPN
RPN also has the following advantages:
Intermediate Results - As operations are entered, intermediate results are displayed on the lower part of the stack entry - without having to hit "=" or other awkward workarounds. This can help identify errors and promote understanding of how the calculation works. Also, RPN makes it easier to use prior results in following calculations. For instance, if you did some calculations to find areas of two rectangles, and then you wanted to add those areas together, if both calculations are already on the stack you can get the sum by just entering "+".
Consistency - It can be hard to remember on some calculators whether the operation is pressed before entering the number or after. The square root key, in particular, seems to work differently on every calculator. With RPN you always know the order of calculation entry because it always works the same.