What is Polish notation (prefix notation)? - Definition from WhatIs.com


Polish notation (prefix notation)

Part of the Computing fundamentals glossary:

Polish notation, also known as prefix notation, is a symbolic logic invented by Polish mathematician Jan Lukasiewicz in the 1920's. When using Polish notation, the instruction (operation) precedes the data (operands). In Polish notation, the order (and only the order) of operations and operands determines the result, making parentheses unnecessary.

The notation for the expression 3(4 +5) could be expressed as

x 3 + 4 5

This contrasts with the traditional algebraic methodology for performing mathematical operations, the Order of Operations. (The mnemonic device for remembering the Order of Operations is "Please Excuse My Dear Aunt Sally" - parentheses, exponents, multiplication, division, addition, subtraction). In the expression 3(4+5), you would work inside the parentheses first to add four plus five and then multiply the result by three.

In the early days of the calculator , the end-user had to write down the results of their intermediate steps when using the algebraic Order of Operations. Not only did this slow things down, it provided an opportunity for the end-user to make errors and sometimes defeated the purpose of using a calculating machine. In the 1960's, engineers at Hewlett-Packard decided that it would be easier for end-users to learn Jan Lukasiewicz' logic system than to try and use the Order of Operations on a calculator. They modified Jan Lukasiewicz's system for a calculator keyboard by placing the instructions (operators) after the data. In homage to Jan Lukasiewicz' Polish logic system, the engineers at Hewlett-Packard called their modification reverse Polish notation (RPN).

The notation for the expression 3(4+5) would now be expressed as

4 5 + 3 x

or it could be further simplified to

3 4 5 + x

Reverse Polish notation provided a straightforward solution for calculator or computer software mathematics because it treats the instructions (operators) and the data (operands) as "objects" and processes them in a last-in, first-out (LIFO) basis. This is called a "stack method". (Think of a stack of plates. The last plate you put on the stack will be the first plate taken off the stack.)

Modern calculators with memory functions are sophisticated enough to accommodate the use of the traditional algebraic Order of Operations, but users of RPN calculators like the logic's simplicity and continue to make it profitable for Hewlett-Packard to manufacture RPN calculators. Some of Hewlett Packard's latest calculators are capable of both RPN and algebraic logic.

This was last updated in March 2011
Contributor(s): David Andrews, Matt K
Posted by: Margaret Rouse

Related Terms


  • Turing test

    - In artificial intelligence (AI), the Turing Test is a method for determining whether or not a computer is capable of thinking like a human. (WhatIs.com)

  • telepresence

    - Telepresence is a sophisticated form of robotic remote control in which a human operator has a sense of being in a remote location so that the experience resembles virtual reality (VR). (WhatIs.com)

  • gravity wave (or gravitational wave)

    - A gravity wave (or gravitational wave) is a ripple in the curvature of the space-time continuum (the enmeshed combination of our three perceived physical dimensions, plus time) created by the movem... (WhatIs.com)


  • Computing fundamentals

    - Terms related to computer fundamentals, including computer hardware definitions and words and phrases about software, operating systems, peripherals and troubleshooting.

  • Internet applications

    - This WhatIs.com glossary contains terms related to Internet applications, including definitions about Software as a Service (SaaS) delivery models and words and phrases about web sites, e-commerce ...

Ask a Question About Polish notation (prefix notation)Powered by ITKnowledgeExchange.com

Get answers from your peers on your most technical challenges

Tech TalkComment



    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.