The Museum of HP Calculators
RPN is formally traced to prefix and postfix mathematical systems proposed by Jan Lukasiewicz in 1951. However many mechanical calculators both before and after 1951 had a certain postfix flavor. Storing numbers in some kind of registers and then performing an operation on them is a natural implementation.
The earliest mechanical calculators operated in a postfix manner. Rather then entering 4 + 5 =, the user cleared the accumulator, keyed (or levered) in the first number, performed some action to add this number to the accumulator, then keyed the second number and performed the same adding action as before. So to add 4 to 5, the user essentially performed:
CLEAR 4 + 5 +
and read the result of 9. To subtract 3 from 4, the user would perform:
CLEAR 4 + ("+" might consist of turning a crank in one direction 3 - whereas "-" might consist of turning it the other way.)
and read the result of 1. Machines like this had a single accumulator and a keyboard register instead of a stack and were limited in their ability to deal with long expressions. (Many modern "adding machine-style calculators" also multiply and divide but these functions are usually implemented in an infix/algebraic notation while the addition and subtraction is still postfix. The HP-10 implemented this form of logic.)
Friden was the second company to produce electronic calculators. The EC-130 implemented the basic four functions and the EC-132 added square root. The Friden ECs had a stack of four registers named "register #1" through "register #4" and the ENTER key served to complete the keyboard entry into register #1.
The Friden logic system had a lot in common with the RPN logic system that HP would later develop but there were some interesting differences including:
"Polish Notation" is really a style of writing expressions on paper rather than keying them on a calculator so determining precisely which calculators were or were not "RPN" is difficult. Since HP first applied the acronym "RPN" to its calculators, and because most users mean HP's specific implementations when they refer to "RPN", the museum doesn't classify the Friden ECs as true RPN calculators.
It's not clear where HP began in the development of the Reverse Polish Notation (RPN). HP considers it a direct derivation from the mathematical works of Jan Lukasiewicz, but it's likely that experience with mechanical calculators and/or the logic system of the Friden ECs influenced them as well.
Used on the HP 9100 and HP 9810.
Introduced on the HP-35. Like 3 Level RPN except:
The HP-35 allowed the user to press the CHS sign before or during number entry. If a number was in the display as a result of something other than digit entry, pressing CHS negated it, but if the CHS key was then followed by a digit, the calculator assumed the CHS was actually meant for the following entry. Thus the previous number displayed was pushed onto the stack without the (already displayed) sign change. This feature could be confusing and later models required the CHS key to be pressed after the first digit of a number.
Introduced on the HP-28C/S. Like 4 Level RPN except:
User RPL also implies other changes beyond the stack such as:
Non RPL machines enter numbers directly into the stack. On RPL machines numbers are typed into an input buffer and copied to the stack via [Enter] The high end desktop machines (made in Colorado) were somewhat more interactive in their input of numbers:
On the HP 9100 and HP 9810, the enter key was labeled only with an arrow pointing up. Drop was indicated by an arrow pointing down. The calculators also had keys with arrows in each direction and the word ROLL to allow rolling either way. Finally an X<->Y (exchange) function was included.
On the HP-35, the word Enter was added to the upward arrow. The small calculator didn't have room for as many stack positioning keys so the only two besides ENTER were the X<->Y and a roll down key indicated by R followed by a downward arrow. This was not a great loss since rolling down, acted much like drop in that the value in X was moved to the top of the stack where it would soon be lost.)
On the HP-80, ENTER was relabeled SAVE. (This was the only calculator so labeled.)
When the HP-28C introduced the unlimited stack, using a roll down function to delete unwanted data in X no longer made sense since any rolled data would live forever at the top of the stack. Thus the HP-9100's downward arrow key returned but this time with the label DROP. This model also relabeled the X<->Y key to SWAP since the stack levels were no longer named.
to What is RPN?
Go back to the main exhibit hall