Digital Electronics

Boolean Algebra Laws

By CourseTron Team ·  8 min read ·  Updated Oct 2026 💬 𝕏 in f
Table of Contents
    ? Print / Save as PDF

    In short: Boolean algebra has a small set of laws (commutative, associative, distributive, identity, null, idempotent and absorption) that let you rewrite any logic expression into a cheaper, equivalent one, which is exactly what synthesis tools do to save gates, area and delay.

    Why these laws matter in real silicon

    Every combinational block you will ever design, from a 4-bit comparator to the decode logic of a CPU, starts life as a Boolean expression. The expression you write first is rarely the cheapest one. A student who writes F = A + A·B has spent an AND gate and an OR gate to build what is simply a wire. Multiply that waste by a few million gates and you see why area, power and timing closure depend on algebra that fits on one page.

    Logic synthesis tools such as Synopsys Design Compiler and Fusion Compiler, Cadence Genus and Siemens Precision apply these same identities automatically, thousands of times, inside their technology-independent optimisation step. Knowing them by hand lets you predict what the tool will do and spot it when RTL is written in a way that hides an easy simplification. It is also one of the most common warm-up topics in VLSI interviews.

    Throughout this article, + means OR, a dot (or juxtaposition) means AND, and a prime (A') means NOT. Boolean variables take only the values 0 and 1, which is why some laws look strange next to ordinary arithmetic. If you have not yet met complements, read our companion piece on De Morgan's theorem first or right after this one.

    Commutative and associative laws: ordering is free

    The commutative laws say that operand order does not matter: A + B = B + A and A·B = B·A. The associative laws say grouping does not matter: (A + B) + C = A + (B + C) and the same for AND.

    These look trivial, yet they have real physical consequences. A 4-input OR can be built as a chain, ((A+B)+C)+D, with three levels of delay, or as a balanced tree, (A+B)+(C+D), with only two. Associativity guarantees the two are logically identical, so the tool is free to choose the tree and cut the critical path. Commutativity is what lets a timing-driven optimiser swap which input of a NAND gate receives a late-arriving signal, because the pin nearest the output is usually faster.

    Key fact: Associativity turns a chain of n two-input gates (n-1 levels) into a tree of about log2(n) levels. For 16 inputs that is 15 levels versus 4.

    Identity, null and idempotent laws: the constants

    These laws describe what happens when you combine a variable with a constant or with itself.

    • Identity: A + 0 = A and A·1 = A. Tying a spare OR input to ground, or a spare AND input to VDD, leaves the function unchanged.
    • Null (annihilator): A + 1 = 1 and A·0 = 0. A constant can swallow a variable entirely, so the gate disappears and its output becomes a constant.
    • Idempotent: A + A = A and A·A = A. Repeating a term adds nothing.

    The null law is why synthesis tools propagate constants. If an RTL parameter ties an enable to 0, every AND it feeds collapses to 0, and the logic downstream collapses with it. This is the mechanism behind "constant propagation" messages in a Design Compiler log, and it explains why a feature switched off by a parameter costs no area. Idempotence matters when two paths of a design generate the same term; the redundant copy is removed during structural hashing.

    LawOR formAND form
    CommutativeA + B = B + AA·B = B·A
    Associative(A+B)+C = A+(B+C)(AB)C = A(BC)
    IdentityA + 0 = AA·1 = A
    NullA + 1 = 1A·0 = 0
    IdempotentA + A = AA·A = A
    AbsorptionA + AB = AA(A + B) = A
    DistributiveA + BC = (A+B)(A+C)A(B + C) = AB + AC

    The distributive laws: Boolean algebra's surprise

    The AND-over-OR form, A(B + C) = AB + AC, matches high-school algebra. The OR-over-AND form, A + BC = (A + B)(A + C), has no arithmetic counterpart, and it is the one that trips up beginners. You can verify it with a truth table, or by expanding the right side: (A+B)(A+C) = AA + AC + AB + BC = A + AC + AB + BC = A(1 + C + B) + BC = A + BC. That derivation quietly uses idempotent, null and identity laws together.

    Proof by truth table: A + BC = (A + B)(A + C) A B C A + BC (A+B)(A+C) 00000 00100 01000 01111 10011 10111 11011 11111 All 8 rows match, so the two expressions are the same function. CourseTron · coursetron.com
    Both columns agree on every input combination, proving the OR-over-AND distributive law.

    Key fact: Every Boolean law has a dual. Swap AND with OR and 0 with 1 and a true law stays true. That is why the table above comes in pairs, and it halves what you must memorise.

    Absorption: the biggest saver

    Absorption says A + A·B = A and A·(A + B) = A. Intuitively: if A is already 1, the OR is 1 no matter what B is; if A is 0, then A·B is 0 and the OR equals A. Either way B has no influence. The proof from earlier laws is short: A + AB = A·1 + AB = A(1 + B) = A·1 = A, using identity, distributive and null.

    Absorption: F = A + A·B simplifies to F = A Before: 2 gates A B AND A·B OR F After: 0 gates A F A plain wire. B is absorbed. Saves about 10 transistors in static CMOS (AND2 + OR2), plus two gate delays. CourseTron · coursetron.com
    Absorption removes both gates; B never reaches the output.

    See it in motion below. The orange cursor sweeps across eight time slots. Notice that F = A + AB is identical to A in every slot, even when B toggles independently.

    Timing view: F = A + A·B always follows A A B F = A + AB Orange cursor = time. B changes, F ignores it. CourseTron · coursetron.com
    Animated waveforms: the F trace is a copy of the A trace; B has no effect.

    Worked example: simplify step by step

    Take F = A·B + A·B·C + A·(B + B) + A·1·D. Apply the laws in order:

    • Idempotent: B + B = B, so the third term becomes A·B.
    • Identity: A·1·D = A·D.
    • Now F = AB + ABC + AB + AD. Idempotent again merges the two AB terms: F = AB + ABC + AD.
    • Absorption: AB + ABC = AB(1 + C) = AB. So F = AB + AD.
    • Distributive (factoring): F = A(B + D).

    The original needs roughly four AND gates and several ORs, around 14 two-input-equivalent gates. The final form needs one OR and one AND, a seven-fold reduction. A K-map gets you the same answer; our guide to Karnaugh map simplification shows the graphical route, while algebra is what the tool performs internally.

    Key fact: Algebraic simplification has no guarantee of finding the absolute minimum. Heuristics like those in Espresso or ABC (used inside commercial flows) combine these laws with consensus and complement rules to approach it.

    Common mistakes and interview traps

    • Writing A + A·B = A + B. That is false; the correct similar rule is A + A'B = A + B, which needs a complement.
    • Applying ordinary algebra, such as "cancelling" A + B = A + C to get B = C. Boolean algebra has no cancellation law.
    • Forgetting that the second distributive law is valid; many candidates call (A+B)(A+C) unsimplifiable.
    • Over-minimising by hand and removing a deliberate redundant term. Some redundancy, such as a consensus term, prevents glitches (static hazards), so synthesis and designers sometimes keep it on purpose.

    If you want guided practice, labs and mock interviews on exactly this material, the training team at ChipXpert VLSI training runs hands-on batches, and our own CourseTron courses cover digital fundamentals end to end.

    Ready to go beyond identities and design real combinational and sequential blocks? Explore the Digital Electronics track in the CourseTron course catalogue and start building circuits today.

    Frequently asked questions

    What is the difference between idempotent and absorption laws?

    Idempotent laws deal with one variable repeated (A + A = A). Absorption involves two variables, where a larger term is swallowed by a smaller one (A + AB = A).

    Is A + BC = (A + B)(A + C) really true?

    Yes. It is the OR-over-AND distributive law, and it holds for all eight combinations of A, B and C, as the truth table above shows.

    Do synthesis tools use these laws automatically?

    Yes. Tools like Design Compiler, Genus and Precision perform algebraic and Boolean optimisation, constant propagation and factoring using these identities, then map the result onto library cells.

    How do I remember so many laws?

    Learn each AND/OR pair as one idea using duality, and re-derive absorption from identity, null and distributive. Understanding the derivation is more reliable than memorising it.

    Advertisement