Lukasiewicz RPN Reversed Polish Notation


All HP LED calculators and a majority of the HP LCD calculators uses the RPN input method. The Reversed Polish Notation is derived from the work of the polish mathematician Jan Lukasiewicz (1878 - 1956). He demonstrated a method to write down mathematical expressions without the need for brackets. From 1972 onwards HP used this input method for their pocket calculators because they were convinced that this method was superior to the algebraic method, used on most other brand calculators.

What are the benefits of RPN

  • The unique RPN logic system lets you evaluate virtually any expression without copying and remembering parentheses or restructuring. The calculator remembers what's where, so you don't have to.
  • RPN lets you solve problems your way - the way you first learned in beginning algebra, the way you now use when you use pencil and paper or slide rule.
  • RPN lets you solve problems on step at a time. You never work with more than two numbers at once.
  • RPN gives you continuous and immediate feedback. You see all intermediate answers because the calculator executes each function immediately after you press the function key.
  • RPN makes it easy to recover from errors, You can back trace when you goof because the calculator performs operations sequentially.
  • RPN lets you re-use numbers without re-entering them. Your calculator becomes your scratch pad. This is a real time-saver when you're working with large numbers or making long chain calculations.
  • RPN is a more logical input method. Once used to RPN, you don't like algebraic anymore.


How RPN works

For two argument operations in RPN, the two arguments of the calculation are given first, separated with an ENTER. Both arguments are pushed on a STACK memory. Then the operator is entered. The operator pulls the needed arguments from the stack, calculates the result and pushes the result back on the stack.

To make things clear, a simple RPN calculator is added at the end of this page. The stack of this calculator has four registers, labeled X, Y, Z and T. These register names are also used for the HP calculators. Most calculators only have one line for displaying the results. By default, the X register is shown in the display. Key CLX will clear the X register, key CLS will clear all stack registers.


To calculate the result of (12 + 36) x (72 - 29) / (37 -19) without using brackets:

Enter: 12 ENTER 36 + The intermediate result is stacked in the X register. (48)
Enter: 72 ENTER 29 — The new intermediate result is stacked in the X register. (43)
The previous intermediate result shifted to the Y register. (48)
Enter: X The result of this operation is again stacked in the X register. (2064)
The intermediate results are no longer needed and are gone.
Enter: 37 ENTER 19 — This intermediate result is again stacked in the X register. (18)
The previous intermediate result shifted to the Y register. (2064)
Enter: / The final result is stacked in the X register. ( 114.66666..)


Links related to RPN