HP Forums
HP35s RPN Series # 2 Entry - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: HP35s RPN Series # 2 Entry (/thread-3121.html)

HP35s RPN Series # 2 Entry - MarkHaysHarris777 - 02-17-2015 03:40 AM

While the stack is the 'heart and sole' of RPN, ENTRY is the key interface between the user and the stack; the two are very tightly entwined and inter-related.

The HP35s implements 'classic' HP RPN whereby keying digits (into the X register) causes 'stack lift' to occur immediately upon pressing ENTER, copying the X register immediately into the Y register; of course the Y register is copied into Z, and the Z register is copied into T... the value in T is 'lost' off the top of the stack forever into oblivion (this is not altogether intuitive for initiates to RPN, and indeed it causes new users some consternation and confusion).

Not all HP calculators follow classic RPN, but that's another story.

The typical use is as follows:
1) key some digits... 3.14159265359
2) press the ENTER key
(Immediately the value of PI (in this case) is copied from X into Y, leaving PI in both X & Y)
3) key some digits (a radius, for instance) ... 12.5 ( this overlays the X register with 12.5 )
4) press ENTER (copying the radius into Y, leaving the radius in X, and PI copied into Z)
5) press [X] (this squares the radius, causing stack 'drop' with PI now in Y, x^2 in X)
6) Press [X[ ( now the stack is clear, except for X which now holds the area of our circle, 490.87 )

Is it possible to use the ENTRY mechanism alternately activating 'stack lift' on key-entry, rather than by using the ENTER key... in fact, is it possible to utilize the interface without touching the ENTER key what-so-ever?

Consider ten-key emulation:

In this scenario we must begin with the stack cleared entirely, for reasons which shall become apparent. To clear the stack refer to HP35s RPN Series # 1 Stack.

In the following example we will only be allowed to touch [+] [-] [X] --- no other keys.
[+] primary addend entry interface
[- ] secondary subtrahend entry interface
[X] Clear X {this is the [* T] key on the ten-key machine, and the silver Comptometer lever}

Now then, with the stack initially clear, key some digits followed by [+]. We have not touched the enter key, nor an [=] key gawd forbid, and yet we have our addend in the X register... what happened?

Stack lift occurred on 'key entry' and NOT on ENTER. The zero in X was copied into Y, and then the zero in Y was added to the digits keyed into X, stack 'drop' occurred copying stack zeros down into Y, leaving our SUM in X... whew. Now key some more digits followed by [+]...

Congratulations, you have just emulated every ten-key adding machine on earth, including the Comptometer. Intuitively you might have already keyed some digits followed by [-] to subtract. In either case we have accomplished 'postfix' addition... that is, the operation has followed the key-entry.

The interesting feature of our emulated ten-key adding machine is the Clear X key [X]. In this simulation (permitted the stack is absolutely clear before we begin adding and subtracting) the [X] times operation may be used to Clear X; since following every [+] or [-] operation the Y register will always be zero, and zero times anything is zero, QED-- [X] is Clear X in this scenario. Voila!

This of course is absolutely safe and reliable for balancing your check-book, or working over the wife's credit card statement... or totaling your gin rummy score card/


RE: HP35s RPN Series # 2 Entry - Thomas Klemm - 02-17-2015 05:41 AM

How do you calculate \(\pi r^2\) similar to your example?
Of course you could use the [x2] key, but that's kind of cheating.
You see: ENTER is not only about entry but also about duplicating.