The Museum of HP Calculators

HP Forum Archive 13

[ Return to Index | Top of Index ]

Calculator Logic Systems (long)
Message #1 Posted by bill platt on 15 July 2003, 6:05 p.m.

Until I discovered this forum, I really was not a calculator Geek. Sure, I used one frequently, but I did not think about them constantly.

Now however, I am a total calculator Geek. I think about them all the time. When asked when this will all blow over, I usually say, "we'll see"!

The point of all this prelude: In my previous life, I was only proficient in RPN--meaning that I have always had an intuitive feel for its use (from frequent use) and when tackling complex manual calcs, I have always been able to use all of the stack, and avoid losing data off the back of the t register etc.

For any non RPN machine, I would work with it in a "crippled" mode--using pencil and paper, or the (usualy solitary) memory register even when not needed--always careful.

But now, whenever I see a machine, I have to see how it works--so I have made some interesting discoveries! I am sure many or most of the present audience has already made them, so please forgive my recent enthusiasm.

So far, I have found at least 5 major different logic systems: (and many sub-sets!)


Adding Machine Logic

"Regular Calculator" Logic

"Algebraic" Logic

"Formula entry"

So, for instance, most of the cheap regular 4 or 6 function machines have a curious stack system: Note that I am indicating chain calculations following on from the original:

1+2=3 4=5 6=7; or also 5/2=2.5 5=1 10=0.5


In other words, it is sort of a perfect infix: it remembers the first number and the operator, and if you type anoither number right after, followed by equals, you will get an answer. And therefore if you type equals twice, you will carry on with the answer and the first number. This is actually as good or better than RPN for doing certain chain sums. Of course there is also no precedence--but with a memory register, you can get around this, and in fact I did some big computations and compared them to an HP 20s and they had the same number of keystrokes.

The more curious part is this:

8/=0.125 =0.015625 etc for each equals. In other words, there is an implied leading "1" for some reason. This is sort of a mirror of the other fact: 8x=64 =512 etc.

Interstingly, the built-in Windows calculator does the same thing except that you get the more expected series of:

8/=1 =0.125 =0.015625 etc.

Now, the "algebraics" generally do not seem to have this handy chain behavior, but I am sure some of them do (for instance, the Windows built-in one does). The 20s has no good chain system, other than writing a progam to add or mult a constant, so two keystrokes is still possible.

An interesting thing about the algebraics with precedence, like the 20s, is that you actually do not need to use all the parentheses--and in fact if you use one in every place you see on paper, you will use way more keystrokes. For an RPN guy, this business of whether and when to hit close parentheses, versus =, is quite confusing and a source of error.

Then of course there are the 27s with the stack, and most HP pioneers, with the "input" swap and also last x.......

Finally, a co-worker has a casio with "true" algebraic--so even sqrt, cos, sin etc are infix rather than postfix. I have not explored it in depth yet, but I am sure there are some interesting nuances.

I must say, I was surprised at the utility of the cheapo regular calculator logic, once I got to trying it out!

Regards to all.


Edited: 15 July 2003, 11:15 p.m. after one or more responses were posted

Re: Calculator Logic Systems (long)
Message #2 Posted by harry on 15 July 2003, 7:39 p.m.,
in response to message #1 by bill platt

Theres just one problem: Nothing of this is documented. So you have to do a lot of try and error testing before you know whats going on. And then when you use another of those casio or texas calculators that seams to be exactly the same, you find out it behaves diffrent.

Maybe I am just lazy, but when I calculate something I wanna think about the problem I am solving, not about what the right keystrokes are to avoid loosing data.

Regards, the RPN guy Harry

Re: Calculator Logic Systems (long)
Message #3 Posted by hugh on 15 July 2003, 9:20 p.m.,
in response to message #1 by bill platt

none of mine i can find do the first logic example. what makers work with a prefix constant like that, eg 1+2=3, 4=5? i have found that different manufactures always did have slight differences in operation. today a lot has been standardised.

all the casio i can find, for example, will either auto constant on the second term (eg 1+2=3,3=5) or require you press the operator twice (eg 1++2=3, 3=5). canon, models tend to auto constant this way too.

there is also desk calculator logic. 1+2=[2] (im using [] to indicate the display). this is not right, instead you do; 1+2+[3] or 2*3=[6], but 1+2+[3]2*3=[6]+[6] or on some models, more usefully, 1+2+[3]2*3=[6]+[9]. you also always get an auto accumulator (that works differently) and a memory that works as normal (or two memories).

Re: Calculator Logic Systems (long)
Message #4 Posted by Trent Moseley on 15 July 2003, 10:39 p.m.,
in response to message #1 by bill platt


A very interesting report. The only non HP calc that I have to ckeck all this out is my teeny weeny Sharp ELSI MATE. And I can't find a battery for it. I will get one and report back.


Correction: Calc Logic
Message #5 Posted by bill platt on 15 July 2003, 11:12 p.m.,
in response to message #1 by bill platt

Hugh's observation regarding infix type loading of a constant is correct: I goofed in writing the logic system of "regular" calculators, and Hugh's post is correct, viz:

1+2=3; 2=4; 3=5. However, on my 6yr old's $1 "LeWorld" and on my wife's trusty Sharp ElsiMate EL 230, the multiplication seems to be as my original post, viz:

1x2=2; 3=3; 5=5, and 2x3=6; 5=10 etc. And the Division is different yet again:

20/4=5; 5=1.25; 4=1; 4=1; 4=1 etc! And for Subtraction:

50-5=45; 3=-2; 2=-3; 5=0! Don't ask me to explain this--I have no Idea!

So maybe I should go back to being conservative when using non RPN. Harry s right--the calculations should be reliable!

But I think this behavior of these calculators probably points to the underlying architecture---so I am going to pretend to be an archeologist, and work backwards to deduce the system.....


Bill Platt

[ Return to Index | Top of Index ]

Go back to the main exhibit hall