Boolean: A value that is True or False; override: A setting that changes the normal decision; equivalent: Gives the same output for every allowed input
55-minute lesson sequence
0–5 · Answer the retrieval alone. Compare one reason.
5–15 · Teacher models the example. Students predict each next step.
15–40 · Build, trace and test the main tasks. Work alone first; compare after a checkpoint.
40–50 · Check results. Explain a test and repair one error. Use the extension only if ready.
50–55 · Complete the exit alone. Save the evidence for the next lesson.
Try before notes
What does A AND NOT B mean when A is True and B is False?
Build the idea
Translate the verbal rule into named Boolean inputs, then keep those names consistent across table, circuit and code. The same decision should appear in all three forms. A mismatch is evidence of a translation error.
Test every row for a small number of inputs. Include both false and both true: these rows often distinguish inclusive OR, XOR and equality. Use Boolean inputs for Boolean Python comparisons.
Simplification is a behavioural claim. Check that the original and simplified expression match on all input combinations, not just a typical case. A counterexample is enough to reject a proposed simplification.
words → expression → truth table
↓ ↕
circuit ↔ executable tests
See the method
The fan should run when it is hot and maintenance is off. Let H mean hot and M mean maintenance. Fan = H AND NOT M. For H, M = 0, 0 the output is 0. For 0, 1 it is 0. For 1, 0 it is 1. For 1, 1 it is 0. Put a NOT gate on M, then feed H and NOT M into AND.
def fan_on(hot, maintenance):
return hot and not maintenance
Predict then reveal
A pump runs when a manual switch S OR a dry-soil signal D is true. Give outputs in SD order 00,01,10,11.
Reveal reasoning
The OR outputs are 0,1,1,1. At 11 the pump remains on; this is not an exactly-one rule.
Simplify (P AND Q) OR (P AND Q AND R). Explain why R cannot add a new true case.
Reveal reasoning
The second term already requires P AND Q. Whenever it is true, the first term is true. The whole expression equals P AND Q by absorption. Outputs for PQ=00,01,10,11 are 0,0,0,1 regardless of R.
Work one step together
Read the first task. Each learner predicts the first step privately. Compare the method, then complete one intermediate row or one code iteration together. Do not display a finished workbook answer.
Practice
Build and run a four-row test of fan_on. Print H, M, the expected output and the actual output. Before running, complete the four expected outputs yourself. Sketch or label the two gates.
Your turn
Complete the remaining steps of task 1 alone, then the next tasks. Predict before running code. Save your own evidence before comparing.
Practice
Build and run a four-row test of fan_on. Print H, M, the expected output and the actual output. Before running, complete the four expected outputs yourself. Sketch or label the two gates.
A second design uses F = (H AND O) OR (H AND NOT O), where O means the override switch. Complete all four rows for H, O = 00, 01, 10, 11. Find a simpler rule. Check it in Python.
Compare XOR and OR for two alarm inputs A and B. Write all four rows. Which rule turns on for exactly one active alarm? Give a Python expression for that rule using Boolean inputs.
Check and explain
A different-looking expression may be equivalent; compare behaviour, not just spelling.
Point to the first step, row, condition or requirement that supports your answer. If results differ, find the first different state and repair one cause.
Show what you know
Which one input pair distinguishes OR from XOR?
HL challenge when ready
Check NOT(A AND B) against (NOT A) OR (NOT B). Are they equivalent?
Week 7 homework
Show working. Keep code and output. Stop at 25 minutes and mark where you reached.
Make one revision card with three short parts. Convert decimal 46 to eight-bit binary and hex. Give the output of True AND NOT True. Name the CPU register holding the next instruction address.
A saved log has values [24, 25, 26]. Write the result of count_high(values, 25). Explain how a local controller can keep working when cloud access fails.
Choose the one revision-map area with the weakest evidence. Create one question and a checked answer for that area. Use only content already taught.
Spend about 3 minutes on each during practice time. Predict, run, change one thing, then explain. These prompts do not add homework.
A starter is runnable code to explore or complete. If the playground restores your saved code, the linked starter is selected in Example: use Load example when ready. Download your work before confirming replacement.
Prompt 1
Print a fan truth table using both a temperature condition and an enable switch.
No imports needed.
Hint and starter code
Change one value, predict the output, then run and explain any difference.
# Both conditions must be true for and to produce True.
for hot in [False, True]:
for enabled in [False, True]:
print(hot, enabled, hot and enabled)
Find a counterexample when and is accidentally changed to or.
No imports needed.
Hint and starter code
A counterexample is one input that disproves a claim of equivalence.
# A counterexample is one input that disproves a claim of equivalence.
hot, enabled = False, True
expected = hot and enabled
actual = hot or enabled
print(expected, actual)