The question of which boolean operators (AND, OR, NOT, XOR, etc) have precendence has recently come up on the OCC and although the IB typically won’t give an answer (!), there is a general assumption that we will do what Java does, namely:
- BRACKETS have highest precedence
- NOT
- AND, NAND
- OR, XOR, NOR
- Operators at the same precedence are evaluated left to right.
Test your understanding by drawing logic diagrams for the following:
- A AND B OR C
- A OR B AND C
- A OR B XOR C
- NOT A AND B NOR C