Back to Lesson

Teacher Guide: Boolean Expressions

Learn to write and evaluate Boolean expressions with 1 and 0, use the order of operations NOT, AND, OR, and build their full truth tables.

Use this lesson with your class

Free, no student accounts needed.

Share with students

Students open the lesson and practise with instant feedback.

Printable worksheet

All practice problems on paper, with a separate answer key.

Class quiz

10 questions on Boolean Logic. Students join with a name, you see everyone's score.

For Teachers

Learning Objectives
  • Write Boolean expressions with variables, the values 1 and 0 and the symbols ∧\land, ∨\lor, ¬\neg
  • Apply the order of operations (parentheses, NOT, AND, OR) to evaluate an expression for given inputs
  • Explain how parentheses change the value of a Boolean expression
  • Build the full truth table of an expression with 2 or 3 variables using 2n2^n rows
  • Decide whether two expressions are equivalent by comparing their truth tables
Prerequisites
  • • The AND, OR and NOT operations and compound statements (The AND Operation, The OR Operation, The NOT Operation, Compound Boolean Statements)
  • • Building truth tables with helper columns (Truth Tables)
  • • Order of operations in arithmetic and powers of 2, such as 23=82^3 = 8
Discussion Starters
  • 1. Why do you think mathematicians agreed on an order of operations instead of always working left to right?
  • 2. Write a rule for your school, such as who may use the library, as a Boolean expression. Where do you need parentheses?
  • 3. If two expressions agree for 7 of 8 inputs, are they equivalent? Why or why not?
  • 4. AND works like multiplication with 0 and 1. Why does OR not work exactly like addition?
Common Misconceptions

Boolean expressions are evaluated from left to right

Remediation: Compare with 2+3×42 + 3 \times 4 in arithmetic, then evaluate 1∨1∧01 \lor 1 \land 0 both ways. Only the order NOT, AND, OR gives the agreed result, and different orders give different answers.

NOT in front of a variable negates the whole rest of the expression

Remediation: Evaluate ¬A∧B\neg A \land B and ¬(A∧B)\neg(A \land B) for A=B=0A = B = 0 side by side. The results 0 and 1 show that NOT only touches the next variable unless there are parentheses.

Values can grow beyond 1, as in 1∨1=21 \lor 1 = 2

Remediation: Remind students that 1 and 0 are labels for true and false, not amounts. Ask: is 'true OR true' more true? The answer stays 1.

Differentiation Ideas

For Struggling Students:

  • • Start with expressions with only one operator and one NOT, using 2 variables
  • • Have students rewrite every expression with full parentheses before evaluating it
  • • Use color: circle the NOT parts in one color, the AND parts in another, and evaluate the colors in order

For On-Level Students:

  • • Evaluate expressions with 3 variables and mixed operators for given inputs
  • • Build complete truth tables with helper columns for 2 and 3 variables
  • • Decide whether pairs of expressions are equivalent from their truth tables

For Advanced Students:

  • • Find an expression whose truth table matches a given final column
  • • Translate rules from a program or spreadsheet into Boolean expressions and test them
  • • Look for a shorter expression with the same truth table and check it row by row
Standards Alignment
  • HSA.SSE.A.1 (CCSS.MATH.CONTENT.HSA.SSE.A.1)

    Interpret expressions that represent a quantity in terms of its context

  • CCSS.MATH.PRACTICE.MP6 (MP6)

    Attend to precision

  • CCSS.MATH.PRACTICE.MP7 (MP7)

    Look for and make use of structure

Lesson Resources
  • visualInteractive Truth Table

    Students fill in the result column for AND, OR and NOT with 2 variables and check their answers

  • activityParentheses Race

    Teams get the same inputs and an expression without parentheses, then add parentheses to change the result and explain why

  • worksheetEvaluate and Compare

    Expressions to evaluate for given inputs, plus pairs of expressions to compare with full truth tables

Lesson Content

Everything students see: definition, examples, common mistakes, applications. Tap to open.

Definition

A Boolean expression is a formula built from Boolean variables (letters such as AA, BB, CC), the values 11 (true) and 00 (false), and the operators AND (∧\land), OR (∨\lor) and NOT (¬\neg). Just like 3+4×23 + 4 \times 2 in arithmetic, a Boolean expression has exactly one value, but that value is always 11 or 00.
The three operators with 1 and 0:
  • ¬A\neg A flips the value: ¬1=0\neg 1 = 0 and ¬0=1\neg 0 = 1
  • A∧BA \land B is 11 only when both AA and BB are 11
  • A∨BA \lor B is 11 when at least one of them is 11
Order of operations: first parentheses, then NOT, then AND, then OR.
(  )  →  ¬  →  ∧  →  ∨(\;) \;\to\; \neg \;\to\; \land \;\to\; \lor
So A∨B∧CA \lor B \land C means A∨(B∧C)A \lor (B \land C), and ¬A∧B\neg A \land B means (¬A)∧B(\neg A) \land B.
Example: evaluate A∨B∧¬CA \lor B \land \neg C for A=0A = 0, B=1B = 1, C=0C = 0:
0∨1∧¬0=0∨1∧1=0∨1=10 \lor 1 \land \neg 0 = 0 \lor 1 \land 1 = 0 \lor 1 = 1
An expression with nn variables has 2n2^n input combinations. Its truth table lists the value of the expression for every one of them, starting with the row where all variables are 00. Two expressions are equivalent when their final columns match in every row. (The Truth Tables lesson started with the all-true row instead; any fixed order works. The interactive truth tables in this lesson also use 11 and 00.)

Worked Examples

Evaluate A∧¬BA \land \neg B for A=1A = 1 and B=0B = 0.

1

Substitute the values

Replace AA with 11 and BB with 00 → 1∧¬01 \land \neg 0

2

Do NOT first

¬0=1\neg 0 = 1 → 1∧11 \land 1

3

Do AND

Both values are 11, so AND gives 11

Common Mistakes

Working left to right: 1∨0∧0=(1∨0)∧0=01 \lor 0 \land 0 = (1 \lor 0) \land 0 = 0

Why it's wrong: AND comes before OR, just as multiplication comes before addition. Without parentheses, the AND part is done first.

Correct: 1∨0∧0=1∨(0∧0)=1∨0=11 \lor 0 \land 0 = 1 \lor (0 \land 0) = 1 \lor 0 = 1

Applying NOT to everything after it: reading ¬A∧B\neg A \land B as ¬(A∧B)\neg(A \land B)

Why it's wrong: Without parentheses, NOT applies only to the variable directly after it.

Correct: ¬A∧B=(¬A)∧B\neg A \land B = (\neg A) \land B. To negate the whole AND, write ¬(A∧B)\neg(A \land B).

Adding like numbers: 1∨1=21 \lor 1 = 2

Why it's wrong: A Boolean expression can only be 11 or 00. OR asks whether at least one value is 11, it does not count them.

Correct: 1∨1=11 \lor 1 = 1, 1∧1=11 \land 1 = 1 and ¬1=0\neg 1 = 0. The answer is always 11 or 00.

Calling two expressions equivalent after testing only one or two inputs

Why it's wrong: A∧(B∨C)A \land (B \lor C) and A∧B∨CA \land B \lor C give the same value in 6 of the 8 rows, yet they are different.

Correct: Build the full table with 2n2^n rows and compare every row. One row that differs means not equivalent.

Why It Matters

Boolean expressions are the language computers use to make decisions:
  • Programming: every if-condition is a Boolean expression, such as (age at least 12 AND NOT banned) OR has a parent. Forget the parentheses and the program lets in the wrong people
  • Search and filters: online shops and libraries combine filters like in stock AND (red OR blue)
  • Spreadsheets: functions such as AND(), OR() and NOT() decide which rows are highlighted
  • Electronics: every chip turns Boolean expressions into circuits of logic gates, as you will see in the Logic Gates lesson
  • Games and smart homes: a door opens or a light switches on when an expression of several sensors equals 1
If you know the order of operations and can build a truth table, you can predict exactly what a rule does in every possible situation.

Real World Applications

Rules in a Program

Programmers write rules as Boolean expressions and test every combination of inputs before the program goes live.

Example:

A theme park ride lets you in if T∧(H∨P)T \land (H \lor P): TT = you have a ticket, HH = you are tall enough, PP = a parent rides with you.

1Try It Yourself

The ride rule is T∧(H∨P)T \land (H \lor P). A child has a ticket (T=1T = 1), is not tall enough (H=0H = 0) and rides with a parent (P=1P = 1).

How many test cases does the rule have, and may the child ride?

Step 1: Write the mathematical expression

Write the number of test cases as a power of 2:

Spam Filters

An email program decides with a Boolean expression whether a message goes to the spam folder.

Example:

A filter marks an email as spam if L∨S∧¬KL \lor S \land \neg K: LL = sender is on a block list, SS = suspicious words, KK = sender is in your contacts.

2Try It Yourself

The rule is L∨S∧¬KL \lor S \land \neg K. An email from a friend in your contacts (K=1K = 1) contains a suspicious word (S=1S = 1), and the sender is not on the block list (L=0L = 0). With 0 and 1, AND works like multiplication and NOT like 1−x1 - x.

Does the email go to spam?

Step 1: Write the mathematical expression

Write S∧¬KS \land \neg K as a calculation:

Smart Home Rules

Two different expressions can control a device in exactly the same way. A truth table shows when a long rule can be replaced by a short one.

Example:

A garden light uses the rule M∨M∧NM \lor M \land N: MM = motion detected, NN = it is night.

3Try It Yourself

An engineer wants to replace the rule M∨M∧NM \lor M \land N with the shorter rule MM.

Do the two rules always switch the light the same way?

Step 1: Write the mathematical expression

Write the number of rows as a power of 2:

Key Takeaways

  • 1A Boolean expression combines variables, the values 1 (true) and 0 (false) and the operators ∧\land, ∨\lor, ¬\neg
  • 2The value of a Boolean expression is always 1 or 0, never 2 or more
  • 3Order of operations: parentheses first, then NOT, then AND, then OR
  • 4NOT applies only to what comes directly after it: ¬A∧B\neg A \land B is not ¬(A∧B)\neg(A \land B)
  • 5An expression with nn variables has a truth table with 2n2^n rows, starting with the row where all variables are 0
  • 6Two expressions are equivalent when their final columns are the same in every row

Frequently Asked Questions

Why does AND come before OR?

It is a convention, like multiplication before addition. With 0 and 1, AND behaves like multiplication (1×0=01 \times 0 = 0), and OR is often compared to addition, so the same order feels natural.

Can I just use parentheses everywhere?

Yes. Parentheses that only show the order of operations never change the value, and they make the expression easier to read. A∨(B∧C)A \lor (B \land C) is the same as A∨B∧CA \lor B \land C, but the first version shows the order at a glance.

Are 1 and 0 the same as true and false?

Yes. 1 stands for true and 0 for false. Computers use 1 and 0 because they store everything as bits. The interactive tables in this lesson use 1 and 0 too.

Is there a faster way than a truth table to show that two expressions are equivalent?

Yes. Boolean algebra has laws (such as De Morgan's laws) that turn one expression into another step by step. You will learn them in the Boolean Algebra lesson. A truth table is slower but always works.

Glossary

Boolean variable
A letter such as AA, BB or CC that can only take the values 1 (true) or 0 (false)
Boolean expression
A formula made of Boolean variables, the values 1 and 0 and the operators ∧\land, ∨\lor, ¬\neg
Order of operations
The rule for which operator is done first: parentheses, then NOT, then AND, then OR
Truth table
A table that lists the value of an expression for all 2n2^n combinations of its variables
Equivalent
Two expressions are equivalent when they have the same value in every row of the truth table

Formula Card

Order of operations

(  )  →  ¬  →  ∧  →  ∨(\;) \;\to\; \neg \;\to\; \land \;\to\; \lor

Parentheses first, then NOT, then AND, then OR

NOT

¬0=1,¬1=0\neg 0 = 1, \quad \neg 1 = 0

Flips the value of what comes directly after it

AND and OR

1∧1=1,0∨0=01 \land 1 = 1, \quad 0 \lor 0 = 0

AND is 1 only if both are 1; OR is 0 only if both are 0

Number of rows

rows=2n\text{rows} = 2^n

$n$ is the number of variables: $2^2 = 4$, $2^3 = 8$

More in This Topic