The Polish Notation
Invented by Polish logician Jan Łukasiewicz in 1924, this notation simplifies logic by ensuring an operator immediately precedes the data it operates on.
Loading...
Loading Curriculum...
Loading Subject...
Loading Topic...
Loading Lesson...
Loading Lab...
Prefix (Polish Notation) places operators before their operands. For example, `A + B` becomes `+ A B`. Like Postfix, it is unambiguous and requires no parentheses.
Invented by Polish logician Jan Łukasiewicz in 1924, this notation simplifies logic by ensuring an operator immediately precedes the data it operates on.
Because the operator comes first, evaluating Prefix requires scanning the string backwards (Right-to-Left). By doing this, operands are pushed to the stack first, and when an operator is hit, the two operands are readily available on top.
If you've ever written LISP, Scheme, or Clojure, you've written Prefix! Math in LISP looks like `(+ 1 2)` instead of `1 + 2`.