An AbacusEducalc.net - HP Calculator
Jump to: What's new here? Comments & Talk Back
Home » Calculator Glossary » 

RPN - HP Exclusive Technology

RPN or Reverse Polish Notation is an efficient data entry method that eliminates the need to enter parentheses in equations, has been a favorite of HP calculator fans for more than 30 years, and it remains alive and well at HP.  Access on-line HP RPN Emulator.

In the 1920's, Jan Lukasiewicz developed a formal logic system which allowed mathematical expressions to be specified without parentheses by placing the operators before (prefix notation) or after (postfix notation) the operands. For example the (infix notation) expression

(4 + 5) × 6

could be expressed in prefix notation as

× 6 + 4 5    or    × + 4 5 6

and could be expressed in postfix notation as

4 5 + 6 ×    or    6 4 5 + ×

Prefix notation also came to be known as Polish Notation in honor of Lukasiewicz. HP adjusted the postfix notation for a calculator keyboard, added a stack to hold the operands and functions to reorder the stack. HP dubbed the result Reverse Polish Notation (RPN) also in honor of Lukasiewicz.

HP RPN Calculator

HP produces certain models of calculators with RPN because it is an extremely powerful yet simple way to perform computation. The HP 48g and HP 12c financial calculator use RPN exclusively. HP also recognizes that some customers prefer the traditional algebraic entry mode. This is why some HP calculators operate in both RPN and algebraic mode. For example, the 17bII and 49g can be switched between the two modes.

RPN is also consistent in its usage.

Learning to use RPN

If you've recently acquired your first RPN calculator and it didn't come with a manual, this section will get you started.

Do you remember how you originally learned to do math? Most of us were taught to write down the numbers we wanted to add and then add them like:

    25
    12
   ----
    37

RPN works the same way. Take your new calculator and key in 25. Press the ENTER key to tell the calculator that you are finished keying this number. Now key in 12 and tell the calculator to add it to the previous number by pressing the + key. The result of 37 will immediately be displayed. Subtraction, multiplication and division all work the same way but with the -, ×, and ÷ keys substituted for the + key. Try it!

This also works for more than two numbers. To multiply the numbers 5, 6 and 7 together press 5 ENTER 6 ×7 × and read the result. Note that you didn't press ENTER after the 2nd and 3rd numbers because the operation key makes it clear that you are finished keying these numbers.

Many functions require only one number. On an RPN calculator, you still enter the number and then press the operation key and see the result. (Many calculators that claim to be algebraic use the same method since it takes less keystrokes than real algebraic syntax.) For example, to compute the sine of 10 press 1 0 SIN and read the result. To compute e5 press 5 ex.

Just remember that RPN calculators perform mathematical operations immediately when you press the operation keys so the number(s) must be entered first. There are no "pending operations" or precedence in RPN calculators. When multiple numbers must be entered in sequence, separate them with the ENTER key.

Comparing RPN with Algebraic Methods

3+5
---
7+6

Or (3+5) / (7+6) = x

Algebraic method: Add 3+5=8. Write down the answer or store it in memory. Add 7+6=13. Now enter the 8 from the first answer and then divide it by entering the second answer to get x=0.62.

RPN method: Touch 3 then the ENTER key. Touch 5 then the + key. Touch 7, and then ENTER. Touch 6 then the + key. Note that the answer to the second sum is displayed. Now here's the magic part. Touch the divide key and the calculator gives the answer, 0.62.

Algebraic: 13 strokes, not counting the effort to write down or memorize the first answer while you calculated the second answer.

RPN: 9 strokes, and no need to write anything down.  RPN: Save Time and Keystrokes!

Where can HP RPN technology be found?

HP Calculators have the HP RPN feature: HP 12c; HP 12cpHP 17bII+, HP 33sHP 48gII, HP 49g+, HP 50g.


Jan Lukasiewicz, 1878 - 1956, is from a Polish speaking family, living in Lvov which is now in the Ukraine.  Lukasiewicz was interested in mathematics at school and he entered the University of Lvov where he studied mathematics and philosophy. Following his undergraduate studies, he continued to work for his doctorate which was awarded in 1902.  In 1911 he was promoted to an extraordinary professor at Lvov.  Lukasiewicz was invited to the new University of Warsaw when it reopened in 1915. It was an exciting time in Poland and a new Kingdom of Poland was declared on 5 November 1916. Lukasiewicz was Polish Minister of Education in 1919 and a professor at Warsaw University from 1920 to 1939. During this period between the wars Lukasiewicz was twice rector of Warsaw University.  Lukasiewicz and his wife fled from Poland during World War II and in 1946 they were in exile in Belgium when he was offered a chair by the University of Dublin in Ireland.

He worked on mathematical logic, wrote essays on the principle of non-contradiction and the excluded middle around 1910, developed a three value propositional calculus (1917) and worked on many valued logics.  Lukasiewicz introduced the 'Polish notation' which allowed expressions to be written unambiguously without the use of brackets.


commentPost your comment

I lost the manual for my hp 17bii+ and I found this very useful web site and I resolved my problem.

Thans a lot
Wilson
5/2/2009 5:54:18 PM - US  | commentreply


Thank you for your site. I have found here much useful information.
Good site ! ;)

OVGuillermo
8/28/2007 6:00:57 AM - BY  | commentreply


RPN is absolutely marvelous, particularly as linear equations become larger and larger. The inherent caching of intermediate values and the method of "building" the final solution as one "disassembles" the equation is so natural, it just seems to flow towards the answer -- and seems to eliminate algebraic mistakes as well.
also Anonymous
7/20/2006 8:27:41 AM - US  | commentreply


The algebraic notation comments in the RPN section are not correct. Algebraic notation calculators now follow the standard order of operations.
Anonymous
1/4/2006 2:51:01 AM - US  | commentreply


Mail this pageMail this page


Professional Real Estate Problem Solving; Using the HP12c; More Real Estate Books...


Essential Equations for the FE Exam; Civil Engineering PE Exam; More Engineering Books...