Home / Learn / Boolean Algebra Laws
Boolean Algebra Laws and Theorems
By Han · Published
Boolean algebra is the mathematics of two-valued logic. It gives you a set of laws for manipulating expressions made from the variables 0 and 1 and the operators AND, OR, and NOT, and those laws let you rewrite a circuit into a simpler, cheaper, or faster equivalent without ever changing its truth table. Learning them well is what separates a student who can only read a circuit from one who can improve it. Throughout this page, AND is written as a product (A·B or just AB), OR as a sum (A + B), and NOT with a prime (A').
The laws come in dual pairs. If you take any valid identity and swap every AND for OR, every OR for AND, and every 0 for 1, the result is also valid. This principle of duality is why the tables below are arranged with the AND form and the OR form side by side, and it roughly halves the amount you actually have to memorise.
The single-variable laws
These describe what happens when a variable meets a constant or itself. They are the ones you use most often, usually without noticing.
| Law | AND form | OR form (dual) |
|---|---|---|
| Identity | A·1 = A | A + 0 = A |
| Null (annulment) | A·0 = 0 | A + 1 = 1 |
| Idempotent | A·A = A | A + A = A |
| Complement | A·A' = 0 | A + A' = 1 |
| Involution | (A')' = A | |
The complement laws are worth pausing on. A variable ANDed with its own inverse is always 0 because the two can never both be 1 at the same time; ORed with its inverse it is always 1 because one of them must be 1. These two facts underpin almost every simplification you will do.
The multi-variable laws
| Law | AND form | OR form (dual) |
|---|---|---|
| Commutative | A·B = B·A | A + B = B + A |
| Associative | A(BC) = (AB)C | A+(B+C) = (A+B)+C |
| Distributive | A(B+C) = AB + AC | A + BC = (A+B)(A+C) |
| Absorption | A(A+B) = A | A + AB = A |
| Consensus | (A+B)(A'+C)(B+C) = (A+B)(A'+C) | AB + A'C + BC = AB + A'C |
| De Morgan | (AB)' = A' + B' | (A+B)' = A'B' |
The OR-form distributive law, A + BC = (A + B)(A + C), has no equivalent in ordinary numeric algebra and catches many students off guard. It is what lets you convert between Sum of Products and Product of Sums forms. De Morgan's theorem is important enough to get its own worked treatment on the De Morgan's theorem page.
Proving a law: absorption
Every law above can be proved either by a truth table or by algebra from the more basic laws. Take the absorption law A + AB = A. Starting from the left side and factoring out A:
A + AB= A·1 + A·B(identity, rewrite A as A·1)= A(1 + B)(distributive)= A·1(null law, since 1 + B = 1)= A(identity)
The result makes intuitive sense: if A is already true the whole expression is true, and if A is false then AB is false as well, so the B term never adds anything. This kind of short algebraic chain, each step justified by a named law, is exactly what an exam answer for a proof should look like.
Worked simplification
Suppose a truth table gives you the function Y = A'BC + AB'C + ABC' + ABC, four minterms of a three-variable function. The goal is to reduce it to the fewest literals. The trick is that the term ABC is allowed to be reused in more than one grouping, because ABC + ABC = ABC by the idempotent law:
Y = A'BC + AB'C + ABC' + ABC- Pair
ABC' + ABC = AB(C' + C) = AB(complement, identity) - Pair
A'BC + ABC = BC(A' + A) = BC - Pair
AB'C + ABC = AC(B' + B) = AC - Therefore
Y = AB + BC + AC
The simplified expression Y = AB + BC + AC is the majority function: its output is 1 whenever at least two inputs are 1. It went from four three-literal product terms down to three two-literal terms, which is a smaller and faster circuit. You can confirm both forms produce the same truth table by entering each into the CMOS Generator. When a function has more variables and the pairings are harder to spot by eye, the Karnaugh map method does the same job visually.
Frequently Asked Questions
Keep learning
- De Morgan's theorem, the law that turns AND into OR and back.
- Karnaugh maps for simplifying when the algebra gets hard to see.
- Logic gates explained if you need a refresher on the operators themselves.
- Enter any expression in the CMOS Generator to check a simplification.
References: M. M. Mano and M. D. Ciletti, Digital Design; D. M. Harris and S. L. Harris, Digital Design and Computer Architecture.