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.
Class quiz
10 questions on Boolean Logic. Students join with a name, you see everyone's score.
For Teachers
- State the identity, null, idempotent, complement and double negation laws
- Apply the commutative, associative and distributive laws, including
- 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
- • 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)
- 1. Why might an engineer care about saving one gate when a chip has billions of them?
- 2. In ordinary algebra . Why is just 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?
De Morgan's law only negates the variables:
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 with , and the failure of 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.
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:
- • Show that AND, OR and NOT can all be built from NAND gates alone
- • Simplify and explain each step
- 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
- visualInteractive Truth Table
Students compare the AND, OR, NOT, NAND and NOR columns and see De Morgan's laws: NAND matches , NOR matches
- 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.
Lesson Content
Everything students see: definition, examples, common mistakes, applications. Tap to open.
Definition
| Law | AND form | OR form |
|---|---|---|
| Identity | ||
| Null (domination) | ||
| Idempotent | ||
| Complement | ||
| Double negation | (only one form) | |
| Commutative | ||
| Associative | ||
| Distributive | ||
| Absorption | ||
| De Morgan |
Worked Examples
Simplify .
Use the identity law on the first bracket
, because AND with true changes nothing →
Use the null law on the second bracket
, because AND with false is always false →
Use the identity law again
, because OR with false changes nothing →
Answer: . The value of does not matter at all.
Common Mistakes
Writing
Why it's wrong: De Morgan's law flips the operator as well as the variables. Test , : the left side is , the right side is .
Correct: Break the bar and change the sign: and .
Using rules of ordinary algebra, such as or
Why it's wrong: Boolean variables are only 0 or 1, and is 1, not 2. Repeating a variable adds nothing new.
Correct: Use the idempotent law: and .
Reading as
Why it's wrong: AND is evaluated before OR, just like multiplication before addition. With , , the correct value is , but the wrong reading gives .
Correct: Add the brackets before you apply a law: .
Using the complement law on two different variables, as in
Why it's wrong: The complement law only works for a variable and its own negation. With , : , not 0.
Correct: Look for the same letter: and , but cannot be simplified.
Why It Matters
- 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
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 uses 3 gates. Factored as , it needs only 2.
A chip contains 1000 copies of a circuit that computes . Count one gate for each and each .
How many gates does the whole chip save when the circuit is simplified to ?
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.
A program opens a barrier if , where means the visitor has a pass and 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.
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: , , ,
- 3Commutative, associative and distributive laws reorder, regroup and factor; in Boolean algebra OR also distributes over AND
- 4Absorption laws: and
- 5De Morgan's laws: break the bar and change the sign, and
- 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 is not for numbers?
How do I know which law to use next?
Do I still need truth tables if I know the laws?
Can I check a law with ordinary arithmetic?
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
- 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
- and
- Absorption law
- and
Formula Card
Identity and null laws
AND with 1 and OR with 0 change nothing; AND with 0 and OR with 1 decide the result
Idempotent and complement laws
Repeating a variable adds nothing; a variable with its own negation gives a constant
Double negation
Two NOTs cancel each other out
Distributive laws
Both hold in Boolean algebra; the second one does not work for ordinary numbers
Absorption laws
The longer part is swallowed by $A$
De Morgan's laws
Break the bar, change the sign