Back to Lesson

Teacher Guide: Boolean Algebra

Learn the laws of Boolean algebra, including De Morgan's laws, and use them to simplify expressions step by step and check the result with a truth table.

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
  • State the identity, null, idempotent, complement and double negation laws
  • Apply the commutative, associative and distributive laws, including A∨(B∧C)=(A∨B)∧(A∨C)A \lor (B \land C) = (A \lor B) \land (A \lor C)
  • Use De Morgan's laws and the absorption laws to rewrite expressions
  • Simplify a Boolean expression step by step, naming the law used in each step
  • Check a simplification with a truth table and count the gates it saves
Prerequisites
  • • AND, OR and NOT and their truth tables (Introduction to Boolean Logic, The AND Operation, The OR Operation, The NOT Operation)
  • • Building truth tables and comparing columns for equivalence (Truth Tables)
  • • Brackets and compound statements (Compound Boolean Statements)
  • • Order of operations and evaluating expressions (Boolean Expressions)
  • • Logic gates and simple circuits (Logic Gates)
Discussion Starters
  • 1. Why might an engineer care about saving one gate when a chip has billions of them?
  • 2. In ordinary algebra x+x=2xx + x = 2x. Why is A∨AA \lor A just AA in Boolean algebra?
  • 3. How would you explain 'break the bar, change the sign' to a friend with a sentence about the weather?
  • 4. Is a truth table or a chain of laws more convincing as a proof? When would you use each one?
Common Misconceptions

De Morgan's law only negates the variables: ¬(A∧B)=¬A∧¬B\neg(A \land B) = \neg A \land \neg B

Remediation: Use a sentence: 'not (hungry and tired)' does not mean 'not hungry and not tired'. Then build both truth tables side by side and find the rows that differ.

Boolean algebra follows all the rules of ordinary algebra

Remediation: Contrast x+x=2xx + x = 2x with A∨A=AA \lor A = A, and the failure of a+bc=(a+b)(a+c)a + bc = (a + b)(a + c) for numbers with the Boolean distributive law. Checking with 0 and 1 shows where the two systems differ.

An expression that looks shorter is automatically equivalent

Remediation: Insist on naming a law for every step and on a truth table check at the end. Show a 'simplification' that uses an invented law and let students find the row where it fails.

Differentiation Ideas

For Struggling Students:

  • • Start with one law per expression and give students a law sheet to point at
  • • Check every step with the values 0 and 1 before moving on
  • • Use only 2 variables, so each truth table check has just 4 rows

For On-Level Students:

  • • Simplify expressions that need 3 or 4 laws and name each one
  • • Prove the absorption law from the identity, distributive and null laws
  • • Count the gates before and after each simplification

For Advanced Students:

  • • Prove De Morgan's law for three variables: ¬(A∧B∧C)=¬A∨¬B∨¬C\neg(A \land B \land C) = \neg A \lor \neg B \lor \neg C
  • • Show that AND, OR and NOT can all be built from NAND gates alone
  • • Simplify (A∧B)∨(A∧¬B∧C)(A \land B) \lor (A \land \neg B \land C) and explain each step
Standards Alignment
  • HSA.SSE.A.2 (CCSS.MATH.CONTENT.HSA.SSE.A.2)

    Use the structure of an expression to identify ways to rewrite it

  • CCSS.MATH.PRACTICE.MP7 (MP7)

    Look for and make use of structure

  • CCSS.MATH.PRACTICE.MP3 (MP3)

    Construct viable arguments and critique the reasoning of others

Lesson Resources
  • visualInteractive Truth Table

    Students compare the AND, OR, NOT, NAND and NOR columns and see De Morgan's laws: NAND matches ¬A∨¬B\neg A \lor \neg B, NOR matches ¬A∧¬B\neg A \land \neg B

  • activityLaw Cards

    Pairs get one card per law and simplify expressions by laying down one card for each step

  • worksheetSimplify and Check

    Expressions to simplify with named laws, each followed by a truth table check and a gate count

Lesson Content

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

Definition

Boolean algebra is a set of laws for rewriting Boolean expressions. Each law says that two expressions are equivalent: they have the same truth value for every input, so you may always replace one with the other. With the laws you can simplify an expression without building a new truth table every time.
We write 1 for true and 0 for false (the interactive truth tables use 1 and 0 too). Engineers often write A⋅BA \cdot B for A∧BA \land B, A+BA + B for A∨BA \lor B and A‾\overline{A} for ¬A\neg A: these mean exactly the same. In this lesson we use ∧\land, ∨\lor and ¬\neg.
The laws (AA, BB and CC are Boolean variables):
LawAND formOR form
IdentityA∧1=AA \land 1 = AA∨0=AA \lor 0 = A
Null (domination)A∧0=0A \land 0 = 0A∨1=1A \lor 1 = 1
IdempotentA∧A=AA \land A = AA∨A=AA \lor A = A
ComplementA∧¬A=0A \land \neg A = 0A∨¬A=1A \lor \neg A = 1
Double negation¬¬A=A\neg\neg A = A(only one form)
CommutativeA∧B=B∧AA \land B = B \land AA∨B=B∨AA \lor B = B \lor A
Associative(A∧B)∧C=A∧(B∧C)(A \land B) \land C = A \land (B \land C)(A∨B)∨C=A∨(B∨C)(A \lor B) \lor C = A \lor (B \lor C)
DistributiveA∧(B∨C)=(A∧B)∨(A∧C)A \land (B \lor C) = (A \land B) \lor (A \land C)A∨(B∧C)=(A∨B)∧(A∨C)A \lor (B \land C) = (A \lor B) \land (A \lor C)
AbsorptionA∧(A∨B)=AA \land (A \lor B) = AA∨(A∧B)=AA \lor (A \land B) = A
De Morgan¬(A∧B)=¬A∨¬B\neg(A \land B) = \neg A \lor \neg B¬(A∨B)=¬A∧¬B\neg(A \lor B) = \neg A \land \neg B
Notice the pattern: swap ∧\land with ∨\lor and 0 with 1 in one column and you get the other column. This is called duality.
Simplifying step by step: use one law per step and name it. Then check the result with a truth table: if the final columns match in every row, the simplification is correct.

Worked Examples

Simplify (A∧1)∨(B∧0)(A \land 1) \lor (B \land 0).

1

Use the identity law on the first bracket

A∧1=AA \land 1 = A, because AND with true changes nothing → A∨(B∧0)A \lor (B \land 0)

2

Use the null law on the second bracket

B∧0=0B \land 0 = 0, because AND with false is always false → A∨0A \lor 0

3

Use the identity law again

A∨0=AA \lor 0 = A, because OR with false changes nothing → AA

Common Mistakes

Writing ¬(A∧B)=¬A∧¬B\neg(A \land B) = \neg A \land \neg B

Why it's wrong: De Morgan's law flips the operator as well as the variables. Test A=1A = 1, B=0B = 0: the left side is ¬0=1\neg 0 = 1, the right side is 0∧1=00 \land 1 = 0.

Correct: Break the bar and change the sign: ¬(A∧B)=¬A∨¬B\neg(A \land B) = \neg A \lor \neg B and ¬(A∨B)=¬A∧¬B\neg(A \lor B) = \neg A \land \neg B.

Using rules of ordinary algebra, such as A∨A=2AA \lor A = 2A or A∧A=A2A \land A = A^2

Why it's wrong: Boolean variables are only 0 or 1, and 1∨11 \lor 1 is 1, not 2. Repeating a variable adds nothing new.

Correct: Use the idempotent law: A∨A=AA \lor A = A and A∧A=AA \land A = A.

Reading A∨B∧CA \lor B \land C as (A∨B)∧C(A \lor B) \land C

Why it's wrong: AND is evaluated before OR, just like multiplication before addition. With A=1A = 1, B=0B = 0, C=0C = 0 the correct value is 1∨0=11 \lor 0 = 1, but the wrong reading gives 1∧0=01 \land 0 = 0.

Correct: Add the brackets before you apply a law: A∨B∧C=A∨(B∧C)A \lor B \land C = A \lor (B \land C).

Using the complement law on two different variables, as in A∧¬B=0A \land \neg B = 0

Why it's wrong: The complement law only works for a variable and its own negation. With A=1A = 1, B=0B = 0: A∧¬B=1∧1=1A \land \neg B = 1 \land 1 = 1, not 0.

Correct: Look for the same letter: A∧¬A=0A \land \neg A = 0 and B∨¬B=1B \lor \neg B = 1, but A∧¬BA \land \neg B cannot be simplified.

Why It Matters

Every ∧\land, ∨\lor and ¬\neg in an expression becomes a logic gate in a circuit. A shorter expression means fewer gates, and fewer gates mean a chip that is cheaper, smaller, faster and uses less power.
  • Electronics: a processor contains billions of gates, so saving one gate in a circuit that is copied a million times saves a million gates
  • Programming: a condition like NOT (weekend OR holiday) can be rewritten as (NOT weekend) AND (NOT holiday), which is often easier to read and test
  • Search and databases: a filter such as math OR (math AND logic) gives exactly the same results as just math
  • Proofs: the laws let you prove that two circuits or two conditions do the same job without trying every input
In the lesson Truth Tables you checked equivalences row by row, and in the lesson Logic Gates you built circuits. Boolean algebra connects the two: it turns a big circuit into a small one, and a truth table confirms that nothing changed.

Real World Applications

Designing Cheaper Chips

Chip designers simplify every circuit with Boolean algebra before it is built, because each gate costs space, power and money.

Example:

A circuit for (A∧B)∨(A∧C)(A \land B) \lor (A \land C) uses 3 gates. Factored as A∧(B∨C)A \land (B \lor C), it needs only 2.

1Try It Yourself

A chip contains 1000 copies of a circuit that computes (A∧B)∨(A∧C)(A \land B) \lor (A \land C). Count one gate for each ∧\land and each ∨\lor.

How many gates does the whole chip save when the circuit is simplified to A∧(B∨C)A \land (B \lor C)?

Step 1: Write the mathematical expression

Write the saving as a calculation:

Readable Program Conditions

Programmers use De Morgan's laws to remove confusing double negations from conditions in their code.

Example:

NOT (weekend OR holiday) is the same as (NOT weekend) AND (NOT holiday): the shop is open on days that are neither.

2Try It Yourself

A program opens a barrier if ¬(¬P∧¬G)\neg(\neg P \land \neg G), where PP means the visitor has a pass and GG means the visitor is on the guest list.

What is the simplest form of the condition, and how many NOT operators does it remove?

Step 1: Write the mathematical expression

Write the number of NOT operators before and after as a subtraction:

Search Filters

Search engines and databases simplify filters with the absorption law before they run them.

Example:

The filter math OR (math AND logic) returns exactly the same books as the filter math.

3Try It Yourself

A library has 40 math books, and 15 of them are also about logic. A reader searches for math OR (math AND logic).

How many books does the search return?

Step 1: Write the mathematical expression

Add the math books and the extra books that (math AND logic) brings in:

Key Takeaways

  • 1Boolean algebra uses laws to rewrite an expression into an equivalent one, without a new truth table each time
  • 2Identity, null, idempotent and complement laws remove constants and repeated variables: A∧1=AA \land 1 = A, A∨1=1A \lor 1 = 1, A∨A=AA \lor A = A, A∧¬A=0A \land \neg A = 0
  • 3Commutative, associative and distributive laws reorder, regroup and factor; in Boolean algebra OR also distributes over AND
  • 4Absorption laws: A∨(A∧B)=AA \lor (A \land B) = A and A∧(A∨B)=AA \land (A \lor B) = A
  • 5De Morgan's laws: break the bar and change the sign, ¬(A∧B)=¬A∨¬B\neg(A \land B) = \neg A \lor \neg B and ¬(A∨B)=¬A∧¬B\neg(A \lor B) = \neg A \land \neg B
  • 6Simplify one law at a time, name each law and check the result with a truth table; a simpler expression means fewer gates

Frequently Asked Questions

Why can OR distribute over AND, when a+b×ca + b \times c is not (a+b)×(a+c)(a + b) \times (a + c) for numbers?

Because Boolean variables are only 0 or 1. Check both cases: if A=1A = 1, both sides of A∨(B∧C)=(A∨B)∧(A∨C)A \lor (B \land C) = (A \lor B) \land (A \lor C) are 1; if A=0A = 0, both sides become B∧CB \land C. With ordinary numbers 1+2×3=71 + 2 \times 3 = 7 but (1+2)×(1+3)=12(1 + 2) \times (1 + 3) = 12, so this law only holds in Boolean algebra.

How do I know which law to use next?

Look for patterns: a NOT in front of brackets calls for De Morgan, a variable repeated in two brackets calls for factoring (distributive law), and a variable next to its own negation calls for the complement law. The constants 0 and 1 disappear with the identity and null laws.

Do I still need truth tables if I know the laws?

The laws find the simplification, the truth table confirms it. A table with 2 variables has only 4 rows, so it is a quick and reliable check, especially when you are not sure about a step.

Can I check a law with ordinary arithmetic?

Yes, with 0 and 1: A∧B=A×BA \land B = A \times B, ¬A=1−A\neg A = 1 - A and A∨B=A+B−A×BA \lor B = A + B - A \times B. For example, with A=1A = 1 and B=1B = 1: 1+1−1×1=11 + 1 - 1 \times 1 = 1, so 1∨1=11 \lor 1 = 1. The calculator in this lesson works with these numbers.

Glossary

Boolean algebra
The set of laws for rewriting and simplifying Boolean expressions
Law
An equivalence that holds for every value of the variables, such as A∨0=AA \lor 0 = A
Equivalent
Having the same truth value in every row of the truth table
Simplify
Rewrite an expression with fewer operators while keeping it equivalent
De Morgan's laws
¬(A∧B)=¬A∨¬B\neg(A \land B) = \neg A \lor \neg B and ¬(A∨B)=¬A∧¬B\neg(A \lor B) = \neg A \land \neg B
Absorption law
A∨(A∧B)=AA \lor (A \land B) = A and A∧(A∨B)=AA \land (A \lor B) = A

Formula Card

Identity and null laws

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

AND with 1 and OR with 0 change nothing; AND with 0 and OR with 1 decide the result

Idempotent and complement laws

A∧A=A,A∨A=A,A∧¬A=0,A∨¬A=1A \land A = A, \quad A \lor A = A, \quad A \land \neg A = 0, \quad A \lor \neg A = 1

Repeating a variable adds nothing; a variable with its own negation gives a constant

Double negation

¬¬A=A\neg\neg A = A

Two NOTs cancel each other out

Distributive laws

A∧(B∨C)=(A∧B)∨(A∧C),A∨(B∧C)=(A∨B)∧(A∨C)A \land (B \lor C) = (A \land B) \lor (A \land C), \quad A \lor (B \land C) = (A \lor B) \land (A \lor C)

Both hold in Boolean algebra; the second one does not work for ordinary numbers

Absorption laws

A∨(A∧B)=A,A∧(A∨B)=AA \lor (A \land B) = A, \quad A \land (A \lor B) = A

The longer part is swallowed by $A$

De Morgan's laws

¬(A∧B)=¬A∨¬B,¬(A∨B)=¬A∧¬B\neg(A \land B) = \neg A \lor \neg B, \quad \neg(A \lor B) = \neg A \land \neg B

Break the bar, change the sign

More in This Topic