3.1.7 · D5Boolean Algebra & Logic Gates

Question bank — Boolean algebra laws (commutative, associative, distributive)

1,852 words8 min readBack to topic

The picture behind every law — AND as , OR as

Figure — Boolean algebra laws (commutative, associative, distributive)

The Venn view above shows AND (overlap = both true) and OR (either region = at least one true). Notice OR's shaded area contains AND's — that is exactly .

Figure — Boolean algebra laws (commutative, associative, distributive)

The bar view shows all four input rows. For each row the cyan bar () is the taller of the two inputs and the amber bar () is the shorter — literally and .

Figure — Boolean algebra laws (commutative, associative, distributive)

The gate schematic shows why factoring saves hardware: (3 gates) and (2 gates) feed the same output for every input — one fewer gate, same behaviour.


True or false — justify

Each item: decide true/false, then give the reason. A bare verdict scores nothing.

holds for every possible pair of bit values
True. OR is , and — swapping two numbers never changes which is larger, so the output is identical in all four rows.
is the associative law for AND
True. AND is , and — the smallest of three bits is the same regardless of which pair you compare first.
The distributive law is the same as the one in ordinary school algebra
True. AND-over-OR mirrors multiply-over-add exactly, so " times the sum" splitting into a "sum of products" carries over unchanged.
is also valid in ordinary number algebra
False. This OR-over-AND form is unique to Boolean algebra; in real numbers (try : left , right ). It only works because Boolean uses , not .
Commutativity guarantees two rearranged circuits produce identical timing and delays
False. It guarantees the same output value for every input, but wire lengths and gate ordering can change propagation delay — logical equality is not physical identity.
Associativity lets you turn a chain into
False. Associativity only regroups within the same operator; turning an OR chain into an AND-of-OR crosses operators, which is a distributive (or different) transformation, not associative.
False. The left side crosses operators (OR then AND); it cannot be regrouped by associativity, and the two are simply not equal — test : left , right .
Factoring into always reduces the gate count
True. Left uses 2 AND + 1 OR = 3 gates; right uses 1 OR + 1 AND = 2 gates. The outputs match every row, so you save one gate for free.
The three laws can create or destroy inputs — e.g. an expression with 3 variables can drop to 2
False. These laws only rearrange and regroup; the set of variables the output depends on is unchanged. (A variable can vanish only via other laws like idempotent or null, not these three.)
Because , an OR gate has no "first" and "second" input electrically
False. Logically the inputs are interchangeable, but on a real chip the two input pins are distinct copper paths with possibly different delays; only the truth-table output is guaranteed identical.

Spot the error

Each line contains a plausible mistake. Name what's wrong and give the corrected statement.

"Applying distributive: "
The lone must be duplicated into both brackets: correct is . Test : correct gives , the wrong form gives .
"By associativity, "
Associativity does not apply — the expression mixes AND and OR. The two sides differ in general: with , the left is (OR of and ), while the right is (recall in OR), so they are unequal.
"Since order doesn't matter, in Boolean algebra too"
There is no subtraction operator in Boolean algebra — only AND, OR, NOT. Commutativity is stated only for (OR) and (AND); importing subtraction is meaningless here.
"Distributing gives "
The must reach every term inside the bracket: , not . Dropping from the second term breaks the truth table at e.g. .
" expands to , skipping the cross terms"
You cannot skip cross terms during expansion; the full expansion is . It does collapse back to , but only after using and then factoring (since OR anything ) — the collapse is a later step, not an allowed shortcut.
"Because AND is , needs the three inputs compared in a fixed order"
The of three bits is order-independent, so associativity guarantees any grouping/order gives the same result — there is no mandatory comparison order.
"Commutative law says since both ignore order"
Ignoring order is not the same as ignoring the operator. Commutativity swaps operands within one operator; it never lets you swap AND for OR. (, — different functions.)

Why questions

Answer with the underlying reason, not just a restatement of the law.

Why does the OR-over-AND distributive form () feel "weird" to newcomers?
Because in ordinary number algebra you can only distribute multiplication over addition, not addition over multiplication — students copy that one-way habit, but Boolean's structure makes distribution work both directions.
Why must the lone term appear in both brackets when distributing OR over AND?
Because " OR ( AND )" is true whenever is true, so each bracketed sum must independently contain to stay true in exactly those cases — one copy would leave one bracket able to force a .
Why can a 3-input OR gate be built two different ways from 2-input gates?
Associativity says , so both wiring layouts compute the identical function — the engineer picks whichever fits the chip layout better.
Why do all three laws ultimately reduce to facts about and ?
Because AND and OR ; commutativity, associativity, and distributivity are all just algebraic properties that and already satisfy for the numbers and .
Why does simplifying with these laws physically matter for a chip?
Each removed operator is a removed gate, meaning fewer transistors — a cheaper, faster, cooler-running chip that computes the exact same output.
Why is a truth table a complete proof of any of these laws, not just evidence?
With only bits and , a small expression has finitely many input combinations (e.g. ); checking all of them exhausts every possible case, so matching columns is a full proof, not a sample.
Why doesn't commutativity, by itself, ever reduce the gate count?
It only swaps the order of operands feeding one gate — the gate is still there. It enables later steps (lining up a common factor for distributive factoring), but on its own it removes nothing.

Edge cases

Test the laws at the boundaries: constants and , and repeated variables.

Does still hold when ?
Yes trivially — swapping a value with itself changes nothing, so ; the law holds in this degenerate case as it must.
Does the associative law survive if one input is the constant , e.g. vs ?
Yes. Both equal ; the constant is just another bit that handles the same way regardless of grouping.
Does distributive hold when ?
Yes. Left ; right . Both collapse to , consistent for every .
Does hold when ?
Yes. Left ; right . Both saturate to , matching in this boundary case.
What happens to when ?
It becomes , which equals the left side — the law degrades gracefully to a plain identity.
If every variable equals , do all three laws still give matching outputs?
Yes. With all bits , every AND and OR outputs on both sides of each law; the equalities are preserved (this is just one row of the truth table proofs).
Can these three laws ever change an expression's value for some input while preserving it for others?
No. A valid law must match on every row of the truth table; if even one row differed, it would not be a law. Partial matching means the transformation is simply wrong.

Connections

  • Boolean Algebra Identity & Null Laws (the , facts several answers lean on)
  • De Morgan's Theorems (the next simplification tool, easy to confuse with these three)
  • Logic Gates AND OR NOT (physical gates behind , , — figure s03 shows two of them wired up)
  • Karnaugh Maps (automates the factoring the "gate count" figure s03 illustrates by hand)
  • Combinational Circuit Simplification (where the "fewer gates" payoff lands)