AQA A-level Computer Science (7517)Specification point 4.3.3.1

AQA 7517 4.3.3.1: Reverse Polish - infix transformations

The free BugBot lesson that teach this point, a robot to try it on, and the past-paper questions that test it.

What it covers

You write sums as 3 + 4 × 2, with the operator between its two operands. That is infix notation, and it needs rules to be understood: multiplication before addition, left to right otherwise, and brackets to override both. A computer evaluating an expression would rather not deal with any of that. Reverse Polish notation (RPN), also called postfix, puts each operator after its operands, and then needs no brackets and no precedence rules at all.

  • Infix and postfix
  • Why and where RPN is used
  • Converting infix to RPN by hand
  • Evaluating RPN with a stack
  • Converting infix to RPN with a program
Read the free lesson (25 min)

Or do it in the simulator, with tasks that mark themselves

Lessons that teach it

  1. A6.6 Reverse Polish notation Theory of computation
    Infix and postfix, converting both ways, evaluating RPN with a stack, and the shunting-yard algorithm.

Try it on a robot

The task from A6.6 Reverse Polish notation, running here. Change the program and press Run.

The specification is AQA's own document; this page says which of our lessons teach point 4.3.3.1 and is not endorsed by the board.