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
Always make sure that there are no more than four numbers in the
stack at any given time — the contents of the T–register (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
.
Summary of Contents for 33S
Page 14: ......
Page 15: ...Part 1 Basic Operation ...
Page 16: ......
Page 56: ......
Page 64: ......
Page 82: ......
Page 92: ......
Page 122: ......
Page 138: ......
Page 157: ...Part 2 Programming ...
Page 158: ......
Page 184: ......
Page 210: ......
Page 222: ......
Page 293: ...Part 3 Appendixes and Reference ...
Page 294: ......
Page 324: ......
Page 348: ......