How Reverse Polish Logic Works

Marc Petrie
Let’sMOD
Published in
2 min readJul 26, 2019

With reverse polish logic (RPN) a person does not need to specify parentheses to perform an operation. This is more efficient for computer logic, and is more intuitive for the human brain.

The old HP calculators used to use RPN, and Polyup does, too!

For example, if I do the problem eleven plus three divided by five plus two, I would normally need to use parentheses in typical calculator programming logic, so the problem looks like this:

(11+3)/(5+2)

Polyup displays this as a stack:

It sums each pair of numbers then divides, going from top to bottom.

The students can follow this logic. It is far less confusing than using parentheses, and provides a clearer understanding of the order of operations than using traditional logic with parentheses. We adults have a more difficult time following it because our mind is trained a certain way. Imagine looking at the process with an open mind.

Here, the order of operations is explicit and applicable to more advanced operations where PEMDAS doesn’t apply like power, remainder, and absolute value.

Finally, the kids find the stack environment engaging and fun, like a game. The operations are taking in numbers and transforming them in a visual way.

Try it yourselves! Look at machine MSP7PWM or scan the following image:

Let me know what you think!

-Marc

--

--