Boolean Expressions

Test yourself on Boolean Expressions with exam style questions, marked instantly.

Flashcards that come back just before you would forget them.

A revision plan that remembers what you know and shows what to do next.

See which topics you have nailed and which need another look.

Quiz yourself on Boolean ExpressionsGet your flashcardsBuild my revision planTrack my progress

The Language of Logic

Boolean expressions are how we write logic in text form, like algebra for true/false values. Instead of drawing circuit diagrams, we can write "A AND B" or "NOT(A OR B)". Named after George Boole, who invented this mathematical logic in the 1800s - long before computers! His maths became the foundation of all digital computing. Every IF statement you write is a Boolean expression.

Deep Dive: George Boole and the Birth of Binary Logic

From Victorian Mathematics to Modern Computing

George Boole (1815-1864) was an English mathematician who revolutionized logic by treating it as algebra. He asked: "What if we could do maths with TRUE and FALSE instead of numbers?" His answer became Boolean algebra - a system where variables can only be 1 (true) or 0 (false).

Boole died in 1864, never knowing his abstract mathematical logic would become the foundation of computing. Almost 80 years later, in the 1930s-40s, engineers realized Boolean algebra perfectly described electrical circuits - switches that are ON (1) or OFF (0). Every computer since then has been built on Boole's mathematics!

Why this matters: Every time you write an IF statement in code, use search filters online, or query a database, you're using Boolean expressions. Understanding this notation lets you read circuit diagrams and write efficient conditional code.

Boolean Expression Notation

OCR and Edexcel write Boolean operations with the words AND, OR and NOT. AQA also uses a dot, a plus and a bar:

Operation Word Format (OCR, Edexcel, AQA) AQA Notation Example
AND A AND B A · B Like multiplication
OR A OR B A + B Like addition
NOT NOT A Ā (a bar over the letter) Like negative/opposite

Exam note: The dot, plus and bar notation is AQA's. OCR and Edexcel use the words AND, OR and NOT. Be consistent within your answer and use the style your exam board uses.

Writing Boolean Expressions from Descriptions

You need to translate plain English descriptions into Boolean notation:

Plain English Description Boolean Expression What It Means
A and B are both true A AND B Both inputs must be 1
Either A or B is true (or both) A OR B At least one input is 1
A is not true (A is false) NOT A A is 0 (inverted)
A is false but B is true NOT(A) AND B A must be 0 AND B must be 1
A and B, or C (A AND B) OR C Either both A&B are 1, or C is 1
Not (A or B) NOT(A OR B) Neither A nor B is 1 (both must be 0)
Translation Tips

"Both" or "all" → Use AND

"Either" or "at least one" → Use OR

"Not" or "opposite" → Use NOT

Reading Boolean Expressions from Circuit Diagrams

Work LEFT to RIGHT through the circuit, writing down what each gate does:

Circuit Description Step-by-Step Build-Up Final Boolean Expression
A and B go into AND gate A → AND ← B A AND B
A goes through NOT gate, output goes to AND with B A → NOT → AND ← B NOT(A) AND B
A and B into OR gate, result goes into NOT gate A → OR ← B → NOT NOT(A OR B)
A and B into AND gate, result goes to OR gate along with C A → AND ← B → OR ← C (A AND B) OR C
A through NOT, B as-is, both to OR, then to AND with C NOT(A) → OR ← B → AND ← C (NOT(A) OR B) AND C

Pro tip: Always add brackets to make the order clear, especially with mixed operations!

Expression Evaluation Example: NOT(A) AND (B OR C)

Given: A=1, B=0, C=1 Step 1: NOT(A) = NOT(1) = 0 Step 2: B OR C = 0 OR 1 = 1 Step 3: 0 AND 1 = 0 Final Answer: NOT(A) AND (B OR C) = 0
Always work inside brackets first, then apply NOT, then AND/OR

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 NOT NOT(A) is evaluated before AND/OR
3 AND AND A AND B before OR (like × before +)
4 (Last) 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)

Exam Tips - Boolean Expressions

When writing Boolean expressions:

  • Use brackets liberally - makes order of operations crystal clear
  • Be consistent - don't mix "AND" with "·" in the same answer
  • Use your board's style: OCR and Edexcel use AND/OR/NOT; AQA also uses · + and a bar
  • Check your NOT placement: NOT(A AND B) is very different from NOT(A) AND B

When evaluating expressions:

  • Show ALL steps - write out intermediate values for method marks
  • Work inside-out: Brackets first, then NOT, then AND, finally OR
  • Substitute values clearly: Write "NOT(1) = 0" not just "0"
  • Double-check: Re-evaluate your final answer with original values

Common mistakes to avoid:

  • NOT(A AND B) is different from NOT(A) AND B - check where the brackets are!
  • Forgetting brackets when needed - A AND B OR C is easier to misread without brackets
  • On AQA papers, writing A·B without making clear that · means AND in your answer

Translation tips (English to Boolean):

  • "Both" / "all" → AND operation
  • "Either" / "or" / "at least one" → OR operation
  • "Not" / "opposite" / "false" → NOT operation
  • "Only when A but not B" → A AND NOT(B)

Make this stick

Signing in gives access to all PrepWise features.

PrepWise is a trading name of A3M Quality Solutions Limited, registered in England and Wales, company number 14959172. Registered office: 202 Stroud Road, Gloucester, GL1 5LA. ICO registration ZC267069.