HP (Hewlett-Packard) HP 33s Calculator User Manual


 
2–4 RPN: The Automatic Memory Stack
File name 33s-English-Manual-040130-Publication(Edition 2).doc Page : 388
Printed Date : 2004/1/30 Size : 13.7 x 21.2 cm
Exchanging the X– and Y–Registers in the Stack
Another key that manipulates the stack contents is
w
(x exchange y). This key
swaps the contents of the X– and Y–registers without affecting the rest of the stack.
Pressing
w
twice restores the original order of the X– and Y–register contents.
The
w
function is used primarily to swap the order of numbers in a calculation.
For example, one way to calculate 9
÷
(13
×
8):
Press 13
Ï
8
¸
9
w
¯
.
The keystrokes to calculate this expression from left–to–right are:
9
Ï
13
Ï
8
¸
¯
.
Note
A
lways make sure that there are no more than four numbers in the
stack at any given time — the contents of the T–re
g
ister (the top
register) will be lost whenever a fifth number is entered.
Arithmetic – How the Stack Does It
The contents of the stack move up and down automatically as new numbers enter
the X–register (lifting the stack) and as operators combine two numbers in the X–
and Y–registers to produce one new number in the X–register (dropping the stack).
Suppose the stack is filled with the numbers 1, 2, 3, and 4. See how the stack drops
and lifts its contents while calculating
1. The stack "drops" its contents. The T–(top) register replicates its contents.
2. The stack "lifts" its contents. The T–register's contents are lost.