Overview

Reverse Polish notation (RPN) is an input logic based on a mathematical logic developed in 1920 by the Polish logician Jan Łukasiewicz (1878–1956). It is also known as posfix notation. In RPN, the operators follow their operands. For example, to add two and three, you would enter [2] [ENTER] [3] [+].

Using RPN, intermediate results of calculations are stored automatically, so, there is no need for parentheses.

The Operand Stack

The stack consists of an unlimited, expandable set of storage locations for operands. Metaphorically speaking, they can be said to stack atop one another, like a stack of dishes. The first operand stored would sit at the bottom of the stack, and the last would sit at the top. When adding a new operand, it gets pushed onto the stack. When an operand gets used, it gets popped off of the stack. Intermediate results may become operands, and get pushed onto the stack, then popped off later when used in calculations.


Top
Newest Number
X
2nd Newest Number
Y
3rd Newest Number
4th Newest Number
Bottom
Oldest Number

The newest number is at the top of the stack. This is the number you see in the display. The top and second to top registers are also referred to as the "X" and "Y" registers, respectively.

Clearing the Top (X) Register

To clear the top register to zero, click [CE]. Clicking [C] will clear all the registers.

Rolling the Stack

You can move the top number to the bottom of the stack, and vice versa, by rolling the stack up or down. This is a convenient way to see all the numbers in the stack one at a time. To roll down, click [R↓]. To roll up, click [R↑].

Let's fill the stack with five numbers; 1, 2, 3, 4, and 5. To do so, press [1] [ENTER] [2] [ENTER] [3] [ENTER] [4] [ENTER] [5]. The number 5 in the display is already in the top register, so you don't press [ENTER] after typing it in. Here's the stack:


Top
5
X
4
Y
3
2
Bottom
1

To roll through all the numbers in the stack, click [R↓] five times:


Top
5
[R↓]
4
[R↓]
3
[R↓]
2
[R↓]
1
[R↓]
5
4
3
2
1
5
4
3
2
1
5
4
3
2
1
5
4
3
2
Bottom
1
5
4
3
2
1

Each time you clicked [R↑], the number at the top of the stack rolled down to the bottom. Conversely, you can roll the number at the bottom of the stack up to the top. To roll all the numbers up in the stack, click [R↑] five times:


Top
5
[R↑]
1
[R↑]
2
[R↑]
3
[R↑]
4
[R↑]
5
4
5
1
2
3
4
3
4
5
1
2
3
2
3
4
5
1
2
Bottom
1
2
3
4
5
1

Exchanging Numbers in X and Y Registers

You can exchange numbers in the X (display) and Y registers using the X↔Y button. When you do this, only the X and Y registers are affected. The other registers are not. Clicking [X↔Y] twice consecutively will return the numbers to their original registers. Let's try it:


X
5
[X↔Y]
4
[X↔Y]
5
Y
4
5
4
3
3
3
2
2
2
1
1
1

X↔Y is useful for changing the order of operands in a calculation. Let's calculate 2 ÷ (3 x 4). Click [3] [ENTER] [4] [x] [2] [X↔Y] [÷].
Another way to enter the calculation without exchanging registers would be to do it thus: Click [2] [ENTER] [3] [ENTER] [4] [x] [÷].

Calculations Using Operand Stack

Just as a stack of dishes grows and shrinks as dishes are added and removed from it, the operand stack grows and shrinks as operands are added and removed from it. Let's see how it works for a simple calculation. For this example, we'll assume the stack is already filled with 1, 2, and 3. We'll calculate 2 x 3 + 4 - 5:


Top
3
[x]
6
[4]
4
[+]
10
[5]
5
[-]
5
2
1
6
1
5
1
Bottom
1
1
1

Using RPN, click/press [x], enter 3. The stack reduces by one register, and the X register now has the result of the calculation.

Click/press [4]. The 4 is pushed onto the top of the stack (X register), and the stack increases by one register.

Next, click/press [+]. Again, the stack reduces by one register, and the X register has the result of the calculation.

Click/press [5]. The 5 is pushed onto the top of the stack (X register), and the stack increases by one register.

Next, click/press [-]. The stack reduces by one register, and the X register has the result of the calculation.

Using ENTER

[ENTER] pushes numbers onto the stack. Let's see how it works for a simple calculation. For this example, we'll assume the stack is already filled with 1, 2, and 3. We'll enter two numbers, then add them:


Top
3
[4]
4
[ENTER]
4
[5]
5
[+]
9
2
3
4
4
3
Bottom
1
2
3
3
2
1
2
2
1
1
1

Click/press [4]. The 4 is entered in the X register, and the stack increases by one register.

Click/press [ENTER]. The 4 is pushed onto the Y register of the stack, and the stack increases by one more register.

Click/press [5]. The 5 is entered in the X register.

Next, click/press [+]. The stack reduces by one register, and the X register has the result of the calculation.

Clearing the Stack

[CE] clears only the X register. [C] clears the X register and the entire stack. [AC] clears the X register, the entire stack, all statistical data, and the memory.