This key facts covers Order of Operations (Boolean Precedence) within Boolean Expressions for GCSE Computer Science. Revise Boolean Expressions in 3.4 Computer Systems for GCSE Computer Science with 17 exam-style questions and 22 flashcards. This topic appears regularly enough that it should still be part of a steady revision cycle. It is section 9 of 12 in this topic. Use this key facts to connect the idea to the wider topic before moving on to questions and flashcards.
Order of Operations (Boolean Precedence)
Just like BIDMAS in maths, Boolean expressions have an order of operations:
| Priority | Operation | Symbol | Example |
|---|---|---|---|
| 1 (First) | Brackets/Parentheses | ( ) | Evaluate (A OR B) before anything else |
| 2 | NOT | ¬ or NOT | NOT(A) is evaluated before AND/OR |
| 3 | AND | ∧ or AND | A AND B before OR (like × before +) |
| 4 (Last) | OR | ∨ or OR | A OR B is evaluated last (like +) |
Example without brackets: NOT A AND B OR C
- Step 1: NOT A (NOT first)
- Step 2: NOT(A) AND B (AND second)
- Step 3: [NOT(A) AND B] OR C (OR last)
Practice questions for Boolean Expressions
Which Boolean operator produces an output of 1 only when BOTH inputs are 1?
State De Morgan's first law and give an example to illustrate it.