The distribution law in boolean algebra is the rule that allows a logic term to be multiplied (ANDed) across a sum (OR) of other terms, or added (ORed) across a product (AND), enabling the expansion or factoring of digital logic equations. When you are designing digital systems—whether routing traces for discrete 7400-series logic on a PCB or writing Verilog for a Xilinx Artix-7 FPGA—raw truth tables often yield bloated, inefficient equations. Applying this law is how you strip away redundant gates, reduce your bill of materials (BOM), and shave nanoseconds off critical propagation delay paths.
In a real circuit or installation, applying the distribution law changes the physical hardware footprint. It dictates whether you need two surface-mount ICs or one, how many decoupling capacitors you must place, and whether a complex logic function fits into a single FPGA Look-Up Table (LUT) or spills over into expensive routing fabrics. However, because Boolean algebra operates on binary states rather than continuous quantities, it behaves differently than the algebra you learned in high school, leading to frequent and costly design errors.
The Two Faces of Boolean Distribution
There are two distinct forms of the distribution law in boolean algebra. The first form feels entirely natural to anyone who has taken basic math. The second form is where hobbyists and junior engineers consistently trip up.
A · (B + C) = (A · B) + (A · C)This mirrors standard arithmetic. If you have 2 boxes, each containing an apple and an orange, you have 2 apples and 2 oranges.
A + (B · C) = (A + B) · (A + C)This has no equivalent in standard arithmetic. You cannot distribute addition over multiplication in normal math, but in Boolean logic, the ceiling of
1 + 1 = 1 makes it mathematically valid.
To prove why Form 2 works—and to show why it breaks standard arithmetic—let us look at the actual binary states. Think of Form 2 like a security checkpoint: you get through (Output 1) if you have a master badge (A), OR if you have both a temporary pass (B) and an escort (C). Alternatively, you can frame it as: you must have a master badge or a temporary pass (A+B), AND you must have a master badge or an escort (A+C). Both logic paths yield the exact same access results.
| A | B | C | B · C | A + (B · C) [LHS] | A + B | A + C | (A + B) · (A + C) [RHS] |
|---|---|---|---|---|---|---|---|
| 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 1 | 1 | 1 | 1 |
| 1 | 1 | 0 | 0 | 1 | 1 | 1 | 1 |
| 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 |
As demonstrated in the table above, the Left Hand Side (LHS) and Right Hand Side (RHS) match perfectly across all binary permutations. For a deeper mathematical proof of these identities, the Boolean Rules chapter on All About Circuits provides excellent foundational derivations.
Worked Numeric Example: Optimizing a Safety Interlock
Let us apply this to a real-world hardware scenario. You are designing a safety interlock for an industrial stamping press using discrete 74HC-series logic. The press should fire (Y) if the main guard is closed (A), OR if the light curtain is clear (B) AND the operator is pressing the two-hand trigger (C).
The raw equation derived from your sensors is: Y = A + (B · C)
Worst-case propagation delay ($t_{pd}$): The 74HC08 typical $t_{pd}$ is 14ns at 5V. The 74HC32 typical $t_{pd}$ is 15ns. Total path delay = 14ns + 15ns = 29ns.
Now, we apply the distribution law in boolean algebra to factor the equation into Form 2: Y = (A + B) · (A + C)
Worst-case propagation delay ($t_{pd}$): OR gate (15ns) feeding an AND gate (14ns). Total path delay = 15ns + 14ns = 29ns.
Wait—the propagation delay is identical, and the factored version actually uses three gates instead of two. Why would we ever use the factored version here? In this specific discrete logic case, you would stick to the unfactored LHS to save a physical gate. The distribution law is a two-way street; knowing how to expand is just as important as knowing how to factor.
However, if we flip the scenario to an FPGA environment, the math changes entirely. In a Xilinx 7-Series FPGA, logic is mapped into 6-input Look-Up Tables (LUT6). An unfactored Sum-of-Products equation like Y = (A · B) + (A · C) + (D · E) might consume multiple LUTs and require a carry-chain multiplexer to combine the outputs. By using the distribution law to factor out common terms—Y = A · (B + C) + (D · E)—the synthesis tool (like Vivado) can pack the entire function into a single LUT6. This reduces slice utilization by 50%, eliminates internal routing delays, and drastically cuts dynamic switching power.
Where You Meet This in Practice
You will not just see the distribution law in boolean algebra on a whiteboard; it directly impacts three major areas of electrical and electronic design:
- PLC Ladder Logic Scan Times: In industrial automation, Programmable Logic Controllers evaluate ladder logic rung by rung. An unfactored rung with redundant normally-open (NO) contacts forces the PLC processor to execute multiple memory fetches. Factoring out common permissive conditions using Boolean distribution reduces the instruction count, shaving microseconds off the scan cycle. In high-speed packaging lines, a 2ms scan time reduction can be the difference between a synced actuator and a jammed line.
- Discrete PCB Layout and BOM: When using standard 7400-series ICs, you are constrained by the physical gates per package (e.g., four 2-input NAND gates in a 74HC00). Strategic expansion or factoring allows you to use leftover gates in an existing IC rather than adding a new IC to the BOM. Every new IC requires a dedicated 100nF decoupling capacitor, extra via stitching, and increases the board's quiescent current draw by roughly 2µA to 4µA per package.
- CPLD and FPGA Pinout Routing: Complex Programmable Logic Devices (CPLDs) like the Xilinx CoolRunner-II have strict limits on product terms (P-terms) per macrocell. If your equation exceeds the P-term limit (often 5 or 7 terms), the fitter will fail. Using the distribution law to factor the equation reduces the P-term count, allowing the design to compile and fit into a cheaper, smaller CPLD footprint.
For further reading on how these algebraic laws translate to physical hardware optimization, the Boolean Algebra Laws guide on Electronics Tutorials offers excellent schematic-level breakdowns.
Common Pitfalls and the Arithmetic Fallacy
The most common mistake makers and engineering students make is assuming that standard algebraic rules apply universally to Boolean logic. This leads to the Arithmetic Fallacy.
In standard arithmetic, addition does not distribute over multiplication. If you try to apply Form 2 to real numbers, it fails catastrophically:
2 + (3 × 4) = 14
(2 + 3) × (2 + 4) = 5 × 6 = 30
Because 14 ≠ 30, your brain rejects the concept. You must consciously override your arithmetic intuition when working with logic gates. In Boolean algebra, the absolute ceiling is 1. There is no "5" or "6". When you evaluate 1 + 1, the result is 1, which is the mathematical mechanism that forces the LHS and RHS of Form 2 to balance.
Another frequent confusion is mixing up the Distribution Law with De Morgan's Theorems. De Morgan's deals with inversion (bubbles on logic gates), stating that the complement of a product is the sum of the complements (NOT (A AND B) = NOT A OR NOT B). Distribution does not involve inversion; it strictly deals with the nesting and unnesting of AND/OR relationships. If you see a NOT bar over the entire equation, you are in De Morgan's territory, not Distribution.
Frequently Asked Questions
Can I use the distribution law to simplify an XOR gate equation?
Not directly. The XOR function (A ⊕ B = A·B' + A'·B) is inherently a Sum-of-Products that cannot be factored down into a simpler AND/OR nest using standard distribution. You must rely on De Morgan's or specific XOR identities to manipulate it.
Does my FPGA compiler apply the distribution law automatically?
Yes, modern synthesis tools like Intel Quartus and AMD/Xilinx Vivado use multi-level logic optimization algorithms (like the Espresso heuristic logic minimizer) that automatically factor and expand equations to minimize LUT usage. However, writing clean, factored RTL (Verilog/VHDL) helps the tool converge faster and prevents edge-case routing congestion.
What happens if I expand an equation unnecessarily on a microcontroller?
If you are writing C/C++ for an STM32 or AVR microcontroller, the GCC or Clang compiler will optimize your bitwise operators (&, |) during the build process. Unnecessarily expanding the logic in your source code won't change the compiled assembly, but it will make your code significantly harder for the next engineer to read and debug.






