EXPRESSION FORMATS

TOPIC 03 – CONVERTING FORMATS

 

LESSON WORK

 

 

TASK 1

Are the following expressions in INFIX, PREFIX or POSFIX?  Can you figure out an easy trick to identify the format quickly?

   a) A + B * C

   b) * D + E F

   c) G H – I +


TASK 2

Rewrite the expressions above so that they are fully bracketed expressions.

 

TASK 3
Convert each expression from Task 2 to the other two expression formats.  Note that this is very easy once you have a fully bracketed expression.

 

TASK 4

Convert the following expression to prefix and to postfix.

 

A + (B – C) * D / (E + F)