It looks like you're using an Ad Blocker.

Please white-list or disable AboveTopSecret.com in your ad-blocking tool.

Thank you.

 

Some features of ATS will be disabled while you continue to use an ad-blocker.

 

RPN Logic???

page: 1
5

log in

join
share:

posted on Jun, 29 2021 @ 06:17 PM
link   
Anyone know what RPN logic is? I made my way through Engineering and Physics knowing my way about the RPN logic register. Anyone know this?

It's the most effective computation system known to man...and, it's called "Reverse Polish Logic". The equations I could crack open were endless on the HP45. I was a Surveyor then, in construction. Long lost my HP-45's, but recently I got a HP-31 with RPN, and it just stuns people how fast I can crunch difficult equations in far less steps than on paper.

They say RPN is "difficult to understand", for kids now. I learned it in college. It's one of the best mathematical systems ever developed.

X^up...Y^down...A and B are variables...now, let's compute!

Sorry, I like math. Math is everything, along with physics.

That is all.



posted on Jun, 29 2021 @ 06:20 PM
link   
a reply to: Flyingclaydisk

I've used Reverse Polish Notation all my life, even have Droid48 on my phone.



posted on Jun, 29 2021 @ 06:57 PM
link   

originally posted by: Flyingclaydisk
Anyone know what RPN logic is? I made my way through Engineering and Physics knowing my way about the RPN logic register. Anyone know this?

It's the most effective computation system known to man...and, it's called "Reverse Polish Logic". The equations I could crack open were endless on the HP45. I was a Surveyor then, in construction. Long lost my HP-45's, but recently I got a HP-31 with RPN, and it just stuns people how fast I can crunch difficult equations in far less steps than on paper.

They say RPN is "difficult to understand", for kids now. I learned it in college. It's one of the best mathematical systems ever developed.

X^up...Y^down...A and B are variables...now, let's compute!

Sorry, I like math. Math is everything, along with physics.

That is all.


Been using it all my professional life as an engineer. When I started earning my undergrad degree in Physics, I sold my motorcycle to purchase what was then the only scientific calculator on the market--the HP35, which used RPN. I had to swallow real hard to part with my crotch rocket, but it turned out to be one of the best decisions I ever made. Everyone else was still using slide rules, and I felt like the guy who brought a gun to a knife fight. I didn't realize until I got to grad school and started learning how to program microprocessors that RPN is the native language of microprocessors, and that's why Hewlett Packard designed their calculators that way in the first place.



posted on Jun, 29 2021 @ 07:41 PM
link   
a reply to: Flyingclaydisk

Not something i'm familiar with but always willing to learn and this sounds interesting.

Can you advise of any good learning material and resources?



posted on Jun, 29 2021 @ 07:46 PM
link   
a reply to: 1947boomer

I was APS accredited in systems architecture among other things for HP/Compaq back in the early 2000's so it's possible i've used this and plain forgot.

TBH i'm getting old, sometimes i watch films and get halfway through before i realise i've seen it before.



posted on Jun, 29 2021 @ 11:19 PM
link   
a reply to: Flyingclaydisk

Reverse Polish Notation (RPN).

It is basically where you put the numbers down and then write the operation down next.

Take for instance adding 3 and 2, you would write 3 2 + in reverse polish notation.

It is a logical way of thinking about math for most CPU's because you usually have to pre-load all your values, and then perform an operation on them.



posted on Jun, 30 2021 @ 06:55 AM
link   
a reply to: Grenade

You can look up RPN and find lots of examples, but the essence of the system is you use (4) or more memory slots, or 'registers', called x, y, a, and b. You can change them, but this is the normal set up. To perform a calculation like 1+2, the keystroke sequence would be:

"1, (enter), 2, +"

There is no "=" key on an RPN calculator, the mathematical operator is the "=" key. You can't really see the beauty of the system with a simple calculation like the above, but simplistically say you wanted to find out the total dinner tab, including a 15% tip, on a bill of $87.38, your entries would be:

"87.38, (enter), (enter), .15, X, +"

The two (enter) key entries enters the value 87.38 in the x register, and then enters 87.38 in the y register. The registers roll down as you go, so when you enter .15 and X it multiplies the total, 87.38, by .15 and gives you the total. Because the 2nd entry of 87.38 is sitting directly above it all you have to do is simply hit the + key to add the result to the original total.

This is just a simplistic example because you could just as easily multiply 87.38 x 1.15 and get near the same result. But let's say you wanted to do something a little more complicated like multiply the sum of 9+3, and the sum of 2*6 by 12. The algebraic expression for this would be 12((9+3)+(2*6)). So, for this you would enter:

"12, (enter), 9, (enter), 3, +, (enter), 2, (enter), 6, X, (enter), +, X,"... for a total of 288.

You can quickly see that RPN logic results in a lot less calculator entries. On a regular calculator this same formula would have required the following entries:

"9, +, 3, =, MEM, 1, STO, 6, X, 2, =, MEM, 2, STO, RCL, 1, +, RCL, 2, =, X, 12, ="... for a total of 288.

That's (14) calculator entries vs. (23) calculator entries, or a savings of (9) calculator entries, for the exact same simple equation using RPN logic. This really adds up quick when things get complicated!

Now, obviously most of us could do these example computations in our head's, but as the numbers grow more complex including things like exponents, roots, fractions, logarithmic functions, regressions, trig functions, conversions between units of measure, etc. the savings quickly become apparent. Equally, while these are just simplistic algebraic examples, as the mathematical formulas themselves also become more complex with things like derivatives and differential equations the number of keystrokes on the calculator become less and less even more so.

I can remember solving differential equations on exams in college where I would actually go back and double check my math because I couldn't believe how fast I was able to get the result compared to other people who where struggling to just bang the same equations out on a regular calculator.

edit on 6/30/2021 by Flyingclaydisk because: (no reason given)



posted on Jun, 30 2021 @ 07:52 AM
link   
Sadly, today many school calculators will permit the entry of algebraic formulas directly, and while this may seem easier it also creates a bigger problem. In an educational environment, the ability to directly enter algebraic formulas allows a user to calculate the correct answer without understanding the mathematical hierarchy of how the answer was derived. And, ironically, the total number of entries is often still more than if using RPN logic on an RPN calculator.

Equally ironic is the notion of..."If it ain't broke, don't 'fix' it!!" Unfortunately, HP too fell into this age-old trap. Around 1987 or so, HP thought it would be a good idea to "improve" on the original RPN logic to make it "easier" to understand. The result was what we have now which isn't really RPN, but rather RPL which is a variant of RPN. So, one of the greatest features of RPN was lost in the process, and this was the 'duplicate Y' function.

For those of us familiar with the original RPN logic on HP calculators you probably noticed a couple extra (enter) strokes on the formulas in the previous post. With the original RPN those extra (enter) keys would not have been necessary because x would have automatically been duplicated in the y register. Now you have to do it manually. So, in the example about the dinner tab (with tip), only one entry of (enter) would have been required following the 87.38 entry. In that example there is (1) extra key stroke, but in the example that follows it there are (2) additional entries because of the switch to RPL.

With the original RPN the underlined entries below would not have been required...

"12, (enter), 9, (enter), 3, +, (enter), 2, (enter), 6, X, (enter), +, X,"... for a total of 288

As you can see, with RPL I was having to roll the total up from the y register to the x register, so I could roll it back down and use in a later calculation. With true RPN this step would not have been necessary because the original x value would have remained in the 'x' register after I performed a computation and the moment I entered a new value in the 'y' register.

Sure is a shame when people feel they are compelled to "fix" things!

ETA - And just for those following along, here's what happened in the calculator's memory registers.

When I started I entered 12 and it resided in the x register, when I hit (enter) it rolled up. When I hit 9 it populated the y register with the value of 9, and when I hit enter it rolled up the 9 in the stack. Then when I hit 3 it populated the 'a' register with the value of 3. Then when I hit + it took the value of the 'a' register and added it to the value above it in the 'y' register. Then when I hit (enter) again it rolled the sum up into the 'y' register, leaving the value of 12 in the 'x' register above it. Same process repeated itself for multiplying 6 and 2, and the result was rolled up into the 'a' register. At this point the values of each register were:
x=12
y=12
a=12
b=0

At this point I had two options, I could enter a new 4th value in the 'b' register, or I could perform calculations on the already populated x, y and 'a' registers. Algebra would dictate I choose the latter.

Then, when I hit + it added the 'a' register to the value above it in the 'y' register yielding a value of 24 (now occupying the 'y' register) rolling the stack down one level, and when I hit X it multiplied the value of the 'y' register with the value above it, 12, in the 'x' register. Voila'...288. Each computation rolls the register stack down one level.

edit on 6/30/2021 by Flyingclaydisk because: (no reason given)



posted on Jun, 30 2021 @ 09:55 AM
link   
I guess the logical question at this point is...what if your problem/formula requires more than four memory registers?

There are a couple of options. One option is to change the number of registers available, which is easily done, but isn't usually required. The simpler solution is to use the calculator's traditional memory slots (which are pretty much infinite). This was probably pretty smart on HP's part, because they likely figured most people won't be able to mentally keep track of much more than 4 levels of an active computation at once. So they figured most would probably notate some form of a subtotal at this point and store it somewhere thus compartmentalizing elements of the problem at known calculation points.

edit on 6/30/2021 by Flyingclaydisk because: (no reason given)



posted on Jun, 30 2021 @ 03:02 PM
link   

originally posted by: Flyingclaydisk
I guess the logical question at this point is...what if your problem/formula requires more than four memory registers?

There are a couple of options. One option is to change the number of registers available, which is easily done, but isn't usually required. The simpler solution is to use the calculator's traditional memory slots (which are pretty much infinite). This was probably pretty smart on HP's part, because they likely figured most people won't be able to mentally keep track of much more than 4 levels of an active computation at once. So they figured most would probably notate some form of a subtotal at this point and store it somewhere thus compartmentalizing elements of the problem at known calculation points.


Just expanding on your explanation; in computing, if more than the available registers are required, then values can be placed on a stack, in memory.

The first step is to move the stack pointer value into a separate register, then PUSH values onto the stack until you have finished data entry, and then the process of performing the operation POP's them sequentially from the stack until it decrements to the original start memory location (a comparison being performed at each step until the stack pointer = the stored original stack location).


edit on 30/6/2021 by chr0naut because: (no reason given)




top topics



 
5

log in

join