This page is the drill ground for Boolean variables and operations . The parent note taught you the three operations. Here we make sure you have seen every kind of situation they can appear in, so nothing on an exam can surprise you. Work each example's Forecast in your head before reading on — that guessing is where the learning happens.
Before we start, one reminder of the alphabet we are allowed to use, so no symbol sneaks in undefined:
Definition The whole vocabulary (from the parent)
A Boolean value is one of exactly two things : 0 (false / off) or 1 (true / on).
A (a bar over A ) means NOT A — flip it. 0 = 1 , 1 = 0 .
A ⋅ B (a dot) means AND — output 1 only when both are 1 . Same as A × B .
A + B (a plus) means OR — output 1 when at least one is 1 . It saturates : 1 + 1 = 1 .
Precedence (which happens first, like × before + ): NOT, then AND, then OR .
Boolean algebra has no "quadrants" or "signs" like trigonometry does — its entire universe is { 0 , 1 } . So "every scenario" means every shape of problem the topic can throw at you. Here is the full list, and which worked example covers each cell:
Cell
Case class
What is tricky about it
Covered by
C1
Single-operator, both extreme inputs
The pure definition, no precedence
Ex 1
C2
Precedence collision (NOT + AND + OR together)
Doing them in the wrong order
Ex 2
C3
Degenerate / redundant variable
A variable that does nothing to the answer
Ex 3
C4
All-zero and all-one inputs (limiting cases)
Confirming the "floor" and "ceiling" behaviour
Ex 4
C5
Full truth table, 2 inputs (2 2 rows)
Enumerating every combination without gaps
Ex 5
C6
Full truth table, 3 inputs (2 3 rows)
Same, but 8 rows — easy to miss one
Ex 6
C7
The De Morgan trap (NOT over OR/AND)
The bar does not distribute naively
Ex 7
C8
Real-world word problem
Turning English into Boolean
Ex 8
C9
Exam-style twist: expression that is always the same
Recognising a constant / tautology
Ex 9
We will visit all nine cells. Two of them get a picture, because seeing the "flip / gate / saturate" as geometry locks it in.
Worked example Evaluate each:
1 , 0 ⋅ 1 , 0 + 1 .
Forecast: Say all three out loud before reading. (Hint: flip, all-must-be-1, at-least-one-1.)
1 = 0 . Why this step? NOT flips; the opposite of 1 is 0 .
0 ⋅ 1 = 0 . Why? AND is strict — a single 0 input kills it (like a zero factor in multiplication).
0 + 1 = 1 . Why? OR is generous — one 1 is enough.
Verify: Cross-check with the arithmetic formulas from the parent. A = 1 − A ⇒ 1 − 1 = 0 ✓. A × B = 0 × 1 = 0 ✓. max ( 0 , 1 ) = 1 ✓. All three agree. Answers: 0 , 0 , 1 .
The next picture shows why these three feel so different — each operator is a little machine with its own personality.
A + B ⋅ C for A = 1 , B = 1 , C = 0 .
Forecast: Which operation happens first here? Guess the final value before computing.
Do NOT first: A = 1 = 0 . Why this step? NOT binds tightest — highest precedence, always first.
Do AND next: B ⋅ C = 1 ⋅ 0 = 0 . Why? AND comes before OR (like × before + ). Here C = 0 kills the product.
Do OR last: 0 + 0 = 0 . Why? OR is lowest precedence, so it collects the finished pieces. max ( 0 , 0 ) = 0 .
Verify: Rebuild with brackets to be safe: ( A ) + ( B ⋅ C ) = ( 0 ) + ( 0 ) = 0 . If a beginner wrongly did OR first, they would compute A + B = 0 + 1 = 1 , then 1 ⋅ C = 1 ⋅ 0 = 0 — same answer this time but by luck, not law. Never rely on luck; obey precedence. Answer: 0 .
Worked example Simplify and evaluate
F = A + A ⋅ B for A = 1 , B = 0 , then explain why B barely matters.
Forecast: Does the value of B change the answer when A = 1 ? Guess yes/no.
Plug in directly: F = 1 + 1 ⋅ 0 = 1 + 0 = 1 . Why this step? AND (1 ⋅ 0 ) first, then OR.
Now try B = 1 : F = 1 + 1 ⋅ 1 = 1 + 1 = 1 . Why do this? To test whether B matters — we hold A = 1 and swing B .
Both gave 1 , so with A = 1 the answer is 1 regardless of B . Why? OR only needs one 1 , and A = 1 already supplies it. This is the Absorption law : A + A ⋅ B = A . See Boolean Algebra Laws .
Verify: Check the law itself with A = 0 : 0 + 0 ⋅ B = 0 + 0 = 0 = A ✓ for any B . So A + A ⋅ B always equals A ; B is a degenerate input — it never affects the output. Answer: F = 1 , and B is redundant.
G = A ⋅ B + C , evaluate the two extreme inputs: ( A , B , C ) = ( 0 , 0 , 0 ) and ( 1 , 1 , 1 ) .
Forecast: One extreme gives 0 , the other gives 1 — but which is which? The C term is the twist.
All-zero, ( 0 , 0 , 0 ) : AND part 0 ⋅ 0 = 0 ; NOT part 0 = 1 ; OR them: 0 + 1 = 1 . Why? Even with everything "off", the C flips C = 0 into a 1 , and OR passes it through.
All-one, ( 1 , 1 , 1 ) : AND part 1 ⋅ 1 = 1 ; NOT part 1 = 0 ; OR them: 1 + 0 = 1 . Why? Now the AND term supplies the 1 instead.
Notice both extremes gave 1 but for different reasons . Why check both? Extremes are where sign/flip errors hide; confirming the "floor" ( 0 , 0 , 0 ) and "ceiling" ( 1 , 1 , 1 ) catches most bugs.
Verify: Is G ever 0 ? It needs A ⋅ B = 0 and C = 0 (i.e. C = 1 ). Try ( 0 , 1 , 1 ) : 0 ⋅ 1 + 1 = 0 + 0 = 0 ✓ — so G is not constant; the extremes just happened to both be 1 . Answers: both extremes = 1 .
Worked example Build the complete truth table of
H = A + B .
Forecast: With 2 inputs there are 2 2 = 4 rows. Which single row do you think gives 0 ?
List all 4 input combinations. Why? A truth table must be exhaustive — miss a row and you have not defined the function.
Compute A (flip column A ), then OR with B . Why in that order? NOT before OR (precedence).
A
B
A
H = A + B
0
0
1
1
0
1
1
1
1
0
0
0
1
1
0
1
Only row ( A = 1 , B = 0 ) gives 0 . Why? That is the one row where A = 0 and B = 0 , so OR has nothing to grab.
Verify: H = A + B is exactly the logical statement "A implies B ". It should be true (=1) everywhere except when the premise A = 1 holds but the conclusion B = 0 fails — which is precisely our single 0 row. Meaning matches table. Answer: table above; sole 0 at ( 1 , 0 ) .
Worked example Build the truth table of
M = A ⋅ B + C (the function from Ex 4), all 2 3 = 8 rows.
Forecast: How many of the 8 rows are 0 ? Guess before counting.
Write C changing fastest, then B , then A — the standard binary counting order 000 , 001 , … , 111 . Why? Counting in binary guarantees you list each combination once, no gaps .
For each row: compute A ⋅ B , compute C , then OR.
A
B
C
A ⋅ B
C
M
0
0
0
0
1
1
0
0
1
0
0
0
0
1
0
0
1
1
0
1
1
0
0
0
1
0
0
0
1
1
1
0
1
0
0
0
1
1
0
1
1
1
1
1
1
1
0
1
Count the 0 rows: three of them, all with C = 1 and A ⋅ B = 0 . Why? M = 0 needs both the AND part off and C off (C = 1 ) — matching Ex 4's algebra.
Verify: The rows ( 0 , 0 , 0 ) and ( 1 , 1 , 1 ) both read 1 — consistent with Example 4. And ( 0 , 1 , 1 ) reads 0 — consistent with the "G is not constant" check there. Answer: 3 rows are 0 .
A + B for A = 1 , B = 0 , then compare to the tempting wrong answer A + B .
Forecast: Will "bar over the whole thing" equal "bar over each piece"? Guess before computing.
Correct: do the inside first . A + B = 1 + 0 = 1 , then 1 = 0 . Why? The bar covers the whole expression, so the OR is inside the NOT and must finish first.
Tempting wrong route: A + B = 1 + 0 = 0 + 1 = 1 . Why show it? To expose the trap — this gives 1 , but the correct answer was 0 . They disagree .
The right transformation flips the operator too: A + B = A ⋅ B . Check: 1 ⋅ 0 = 0 ⋅ 1 = 0 ✓. Why? This is De Morgan's law — NOT does not distribute over OR unless you also swap OR to AND.
Verify: A + B = 0 (correct) vs A + B = 1 (wrong) vs A ⋅ B = 0 (correct De Morgan). The picture below shows why the bar "crossing" an OR turns it into an AND.
Answer: A + B = 0 ; the naive A + B is wrong.
Worked example A door unlocks when:
the keycard is valid AND (it is working hours OR the manager override is on ). Let K , H , V be 1 when true. Should the door open for K = 1 , H = 0 , V = 1 ?
Forecast: The employee has a valid card, it is after hours, but the manager flipped the override. Open or stay locked?
Translate English to Boolean: Open = K ⋅ ( H + V ) . Why the brackets? The word "AND" joins K to the whole "(H OR V)" phrase; without brackets, precedence would wrongly split it.
Inside first: H + V = 0 + 1 = 1 . Why? OR needs just one 1 — the override supplies it.
Then AND: K ⋅ 1 = 1 ⋅ 1 = 1 . Why? Both operands are 1 , so the strict AND is satisfied.
Verify: Sanity by story: a valid card plus an active override should open the door even after hours — and it does (1 ). Counter-check V = 0 (no override, after hours): K ⋅ ( 0 + 0 ) = 1 ⋅ 0 = 0 , correctly locked. Answer: the door opens (1 ).
P = A + A has the same value for every input , and state that value.
Forecast: A is either 0 or 1 . What is "A OR (not A )" in each case?
Case A = 0 : P = 0 + 0 = 0 + 1 = 1 . Why? One of the two terms is 1 , and OR grabs it.
Case A = 1 : P = 1 + 1 = 1 + 0 = 1 . Why? Again one term is 1 .
Both cases give 1 , and there are no other cases (a Boolean variable has only these two). Why does this cover everything? Exhaustiveness — with one input there are exactly 2 rows, and we checked both.
Verify: This is the Complement / Tautology law : A + A = 1 always. The companion identity A ⋅ A = 0 always (a thing can't be both true and false) — check: 0 ⋅ 1 = 0 and 1 ⋅ 0 = 0 ✓. See Boolean Algebra Laws . Answer: P = 1 for all inputs (a tautology).
Recall Which cell was hardest? Test the traps.
In A + B ⋅ C , what runs first? ::: NOT, then AND, then OR
A + B equals which of A + B or A ⋅ B ? ::: ==A ⋅ B (De Morgan)==
How many rows for 3 inputs? ::: ==2 3 = 8 ==
What does A + A always equal? ::: ==1 (tautology)==
In A + A ⋅ B , is B needed? ::: ==No — absorption gives A ; B is redundant==
Door logic K ⋅ ( H + V ) with K = 1 , H = 0 , V = 1 ? ::: ==1 , door opens==
Mnemonic The whole page in one line
"Flip first, multiply next, add last — and when a bar jumps an OR, it becomes an AND."