3.1.4 · D5Boolean Algebra & Logic Gates
Question bank — Boolean variables and operations (AND, OR, NOT)
Before we start, one reminder of the ground rules, because almost every trap below is a violation of one of them:
- A Boolean value is only ever 0 or 1 — never 2, never a half, never negative.
- The symbol
+here means OR, the symbol·(or×) means AND, the bar means NOT. - Precedence: NOT first, then AND, then OR — exactly like "× before +" in ordinary maths.
True or false — justify
Every claim below is either right or subtly wrong. State why.
in Boolean algebra.
False. The
+ is OR, which saturates at 1, so ; there is no value "2" in Boolean algebra because a wire is only on or off.but too, so OR and AND always agree.
False. They happen to agree here, but on inputs they differ: OR gives (at least one true) while AND gives (not all true).
Boolean multiplication () is the same operation as ordinary multiplication when values are restricted to 0 and 1.
True. On ordinary multiplication already gives 1 only when both are 1 and 0 otherwise, which is exactly the AND rule — the outputs never leave .
Boolean addition () is the same operation as ordinary addition when values are 0 and 1.
False. Ordinary addition gives , which is outside ; OR must saturate, so it equals or instead.
holds for every Boolean value of .
True. For it gives , for it gives — the flip is exactly "distance from 1", and both inputs are covered.
NOT can take two inputs, like AND and OR.
False. NOT is unary: it flips one value. "" is still NOT of a single (already-combined) value, not NOT of two separate inputs.
.
False. That is ordinary algebra. In Boolean, (idempotent): OR-ing a value with itself changes nothing, since "at least one true" is just "A is true".
.
True. On , and , so squaring returns the same value — AND-ing a value with itself is idempotent.
If a function has 3 inputs, its truth table has 6 rows.
False. It has rows: each input independently doubles the number of combinations, so inputs give rows, not .
The expression means .
False. The bar only covers , so it is . NOT applies to exactly the letter under it unless brackets extend the bar.
Spot the error
Each line contains a wrong step. Say what's wrong and give the correct result.
", because we just bar each letter."
The error is treating NOT like a distributed minus sign. NOT flips the operation too: the correct De Morgan rule is (see De Morgan's Laws).
"For : , so the wrong rule gave the right answer, so it's fine."
Coincidence, not correctness. Try : true answer , but the wrong rule gives . One counterexample kills the rule.
"."
Wrong flip of operation. De Morgan says — the AND becomes an OR when the bar breaks apart.
"To evaluate , do the OR first because it's written first."
Reading order is not precedence order. AND binds tighter than OR, so compute first, then OR with .
" because we did NOT twice."
NOT is not multiplication. Flipping twice returns the original: (double negation), for both and .
" for equals ."
The bracket was invented; there is none. AND first: , then OR: . Same answer here by luck, but the method is wrong and will fail on other inputs.
" because adding a fixed number shifts it."
OR with 1 is not a shift. means "A OR true", which is always true: for any (this is the null/annihilator law of OR).
" because multiplying by 0 leaves it unchanged in Boolean."
No — that's the identity for addition, not multiplication. always (a zero factor kills AND); the AND identity is .
Why questions
Give the reasoning, not just the fact.
Why do we need only three operations (NOT, AND, OR) and not a hundred?
Because these three are functionally complete: any logic function whatsoever can be rewritten using only them, so everything else (NAND, XOR…) is just shorthand built on top — see NAND and NOR gates.
Why does a Boolean variable have exactly two values and not three?
Because it models a physical wire that either carries voltage or doesn't (see Binary Number System); there is no "half a wire", so two states — 0 and 1 — is all the hardware can offer.
Why is OR written with + if it isn't ordinary addition?
The symbol is borrowed because OR behaves like addition on inputs; only the case differs, where OR saturates to 1. The notation is a convenient reuse, not a claim they are identical.
Why must NOT be evaluated before AND and OR?
NOT belongs to a single variable, so it must resolve that variable's value before larger combinations can use it — just as you compute a number before adding it. Highest precedence reflects tightest binding.
Why does the truth table have rows for inputs?
Each input can independently be 0 or 1, so every extra input doubles the number of combinations; independent binary choices give distinct rows (see Truth Tables).
Why can't De Morgan's bar simply "distribute" like a minus sign?
Because negating "A or B is true" logically means "both A and B are false", which is an AND, not an OR — flipping the statement swaps the connective, so the operation itself must change.
Why is always true?
Every value is either 0 or 1, so exactly one of and is 1; OR needs only one true input, so the result is guaranteed 1 (the complement law).
Why is always?
and are opposites, so they can never both be 1; AND needs all inputs to be 1, and here at least one is always 0, forcing the product to 0.
Edge cases
The boundary and degenerate inputs people forget to check.
What is ?
Still . OR is idempotent, so repeating a value adds nothing: "A or A or A" is just "A is true".
What does give, and what does give?
and . NOT is defined by both cases; forgetting one leaves a hole in the truth table.
Is defined when both inputs are 0?
Yes: . The all-zero row is a legitimate table row (row 1 of 4), not an undefined or skipped case.
For AND with three inputs, what makes the output 1?
Only the single row where all three are 1. AND stays strict no matter how many inputs — one 0 anywhere forces the output to 0.
For OR with three inputs, when is the output 0?
Only the single all-zero row. As long as any input is 1, OR outputs 1, so 7 of the 8 rows give 1.
What is versus ?
Both equal . Multiplying by 1 (AND identity) and OR-ing with 0 (OR identity) each leave the value unchanged — these are the two identity elements.
What is versus ?
(AND annihilator: one zero kills it) and (OR annihilator: one true guarantees it). These are the "dominating" constants.
Does precedence still matter when there is only one operation in the expression?
No — with a single operator type there's nothing to order, so or can be grouped any way; both OR and AND are associative.
Active Recall
Recall Fast self-check (click to reveal)
- Does NOT distribute over OR? → ==No; , the operation flips too==
- in Boolean? → 1, OR saturates
- ? → 0, the zero factor dominates AND
- ? → 1, the true value dominates OR
- ? → ==, double negation cancels==
- Rows for 4 inputs? → ====
Connections
- Parent: Boolean variables and operations
- Truth Tables — why rows, checked in the edge-case section.
- De Morgan's Laws — the flip-the-operation rule behind the "spot the error" traps.
- NAND and NOR gates — why three operations suffice (functional completeness).
- Boolean Algebra Laws — identity, null, idempotent laws used throughout.
- Logic Gates — the physical gates these rules describe.
- Binary Number System — why only 0 and 1 exist.