hpsupportheadportlet
Actions ${title}
Loading...
HP Customer Support  Knowledge Base
hpcontactsecondarynavigationportlet
Actions ${title}
Loading...
hpshareprintwidgetportlet
Actions ${title}
Loading...
hpconcentrawrapperportlet
Actions ${title}
Loading...
HP 30b Business Professional Calculator  Using the RPN Stack to Solve Problems Efficiently
The benefits of understanding RPN stack operations
RPN stands for Reverse Polish Notation and is one of two operating modes available on the HP 30b. Mastering RPN leads to an enhanced performance when using the calculator. The first step to master RPN usage is to know all of its available resources.
To put the HP 30b into RPN mode, press , then press five times. The display should show either Chain, Algebraic or RPN. If it does not show RPN and you wish to put the HP 30b into RPN mode, press until the display shows RPN (which would only take one or two times). To exit this menu, press
When RPN mode is active, the RPN annunciator is visible in the display as shown in figure 2 below.
Understanding the HP 30b stack operation in RPN mode
When in normal, 'run' mode, every operation performed in the HP 30b uses the display contents or places results on it. The display always shows the contents of the Xregister. A register is a predefined place in the calculator memory that is able to hold a formatted number with a twelvedigit mantissa and a threedigit exponent of ten. The Xregister is one of five registers that form the RPN stack, represented in figure 1 with all contents cleared to zero.
Figure : Stack registers
Anytime a number is keyed in, the Xregister is updated to hold this number. It is then available for use.
Example 1
What is the most common keystroke sequence to compute the reciprocal of 7.2? What registers in the stack are used?
Solution
The most common keystroke sequence to compute the reciprocal of 7.2 is:
Figure : Calculating the reciprocal of 7.2
In this case, simply typing in the number and pressing the related key are enough to compute the resulting value. There are other functions that use only the Xregister contents, like or . These are the 'onenumber functions', and when they are pressed, the calculator proceeds with the following operation sequence:

Take a copy of the Xregister contents (or the number being typed) and put it in the ANS register;

Replace actual Xregister contents with the resulting value.
If a second number needs to be typed in right after the first one to be used with it, they must be separated with the key. For example, to add 3 and 5 together, you would press .
note:The key can also be used like the key. Long time HP users will probably feel more comfortable using the doublewide key.
Example 2
What is the most common keystroke sequence to enter 2.33 and 4.5 and add them to each other? What registers in the stack are used?
Solution
The most common keystroke sequence to add 2.33 to 4.5 is:
Figure : Adding 2.33 to 4.5 keystroke
In fact, all of the stack registers have their contents changed during this single addition. However, the real question is that since both numbers must "exist" in the calculator memory before is pressed, "Where do they exist?" When is pressed, the calculator proceeds with the following operation sequence:

Take a copy of the Xregister contents and put it in ANS register;

Take Yregister contents and add to Xregister contents;

Replace actual Xregister contents with this resulting value;

'Drop' T and Zregister contents respectively to Z and Yregisters;

Maintain a copy of Tregister contents in T.
note:On the HP 30b, the key terminates digit entry and places the keyed value into the X register. It does not copy this value into the Yregister the way previous RPN calculator implementations have done. In this sense, the HP 30b operates more like the graphical RPL calculators. Therefore, when you want to evaluate 4 + 5 using these keystrokes:, the HP 30b would place the 4 into the Xregister when is pressed, but only copy this 4 into the Yregister when the 5 is keyed and an operation is performed on the 5. In most normal situations, this will not cause any issues, but a long time RPN user should be aware of this behavior.
To have the HP 30b copy the value from the Xregister to the Yregister, you should press twice after keying a number.
Viewing and reordering stack registers contents
Example 3
How would you fill the T, Z, Y and X stack registers with the numbers 44, 33, 22 and 11, respectively?
Solution
The most common keystroke sequence to fill the stack registers with these numbers is:
The stack registers contents would be updated according to the diagrams shown below:
Figure : Stack registers updated
Under certain circumstances, keeping track of whatever is in each stack register is not practical for daily, quick computations. To help viewing the stack contents, three functions are provided: (swaps the contents of the X and Y registers) and and (both keys rolldown all stack registers contents) and rollup all stack register contents). Keeping previous contents as they are, watch how the following keystrokes change the stack:
Figure : Changes in the stack
Using ANS contents in chain calculations
The ANSregister is automatically updated anytime the Xregister contents are changed as the result of a calculation. In this case, the ANSregister is loaded with a copy of the last value in X prior to executing a function. Whenever possible, using the ANSregister contents in chain calculations avoids having to type in numbers or intermediate results again. The ANSregister's contents can be retrieved to the Xregister anytime it is needed with the sequence .
Example 4
What is the shortest keystroke sequence to find y value in the following expression given x=3.4567?
Figure : Expression to find the value of y
Solution
The shortest keystroke sequence to compute y is:
Figure : Calculating the value of y
When is pressed after 3.4567 is keyed in, the ANSregister is loaded with 3.4567, a copy of Xregister contents, before the square root is applied. Right after , retrieves ANSregister contents back to the Xregister so LN(x) can be calculated. What must be remembered is that also pushes up the stack contents. The sequence computes the second part of the right side of the equation, once the original value of X has been brought back from the ANSregister.
Using the stack registers efficiently does not mean to keep track of all stack register contents all the time. Instead keeping track of what is happening, like which registers have their contents being used, is helpful.
Practice solving problems with stack registers
Example 5
Now what is a short keystroke sequence to find y value if the previous expression is changed for the one below, given x=3.4567?
Figure : Expression to find the value of y
Solution
One of the shortest keystroke sequences to compute y in the expression is:
Figure : Calculating the value of y
These examples only begin to scratch the surface of the possibilities that exist when using RPN.
hpfeedbackinputportlet
Actions ${title}
Loading...
hpfeedbackbannerportlet
Actions ${title}
Loading...
hpcountrylocatorportlet
Actions ${title}
Loading...
Country/Region:
United Kingdom
hpdetectloadmydeviceportlet
Actions ${title}
Loading...
hpherosupportsearch
Actions ${title}
Loading...