Boolean functions & truth tables
A Boolean function of n variables is a map {0,1}ⁿ → {0,1}, and it is completely determined by its 2ⁿ-row truth table. Since each row can independently output 0 or 1, there are 2^(2ⁿ) distinct functions of n variables — 16 for n = 2 and 256 for n = 3. Every one of them is expressible in sum-of-products form, which is why the table and the algebra carry the same information.
✓ Unlimited questions · marked criterion by criterion · no card needed
Method: how to approach it
The order below is what examiners expect to see, and each step carries its own marks.
- Enumerate the rows in binary orderFor n variables count from 0 to 2ⁿ − 1 in binary. This ordering makes K-map transfer and comparison straightforward.
- Evaluate subexpressions in columnsOne column per operation, working outward from the innermost brackets.
- Read an expression off the tableFor each row with output 1, write the product of literals describing that row; OR them together.
- Count functions when asked2^(2ⁿ) total. Restricting to a property, such as monotone or self-dual, gives smaller counts.
Worked example
Build the truth table for f(x,y,z) = xy + z′ and write its sum-of-products form.
- Eight rows. f = 1 when xy = 1, i.e. x = y = 1, or when z = 0.
- Rows with z = 0: (0,0,0), (0,1,0), (1,0,0), (1,1,0) — all output 1.
- Rows with z = 1: only (1,1,1) has xy = 1, so it outputs 1; the rest output 0.
- Five rows output 1, giving five minterms.
Answer. f = x′y′z′ + x′yz′ + xy′z′ + xyz′ + xyz — which simplifies back to xy + z′.
Where marks get dropped
These are the specific errors that cost credit on boolean functions & truth tables questions — QED's rubric penalises each of them separately.
- Miscounting rows. Three variables need eight rows; a seven-row table has an omission that invalidates everything after it.
- Reading minterms with the wrong polarity. A row with x = 0 contributes x′, not x.
- Confusing 2^(2ⁿ) with 2ⁿ. The number of functions is doubly exponential — 256 for three variables, not 8.
Practise this until it is automatic
Unlimited fresh questions
QED generates new boolean functions & truth tables problems on demand at warm-up, exam and challenge level, so you can drill this one skill until it stops costing you marks.
Marked like an examiner
Every answer is scored against a point-by-point rubric with partial credit, so you see exactly which step of the method broke down — not just a tick or a cross.
Answer in real notation
A one-tap symbol palette, a visual equation editor and a truth-table builder — or photograph your handwritten working and QED converts it to LaTeX.
Saved to your library
Every question you generate is kept and re-takeable as a timed exam, and your Boolean Algebra mastery is tracked so you know when this is exam-ready.
Boolean functions & truth tables — frequently asked questions
How many Boolean functions of 2 variables are there?
2^(2²) = 2⁴ = 16, which is why the standard list of binary connectives — AND, OR, XOR, NAND, implication and so on — has exactly sixteen entries.
Is the sum-of-products form unique?
The canonical form built from minterms is unique. Simplified sum-of-products forms are not.
Can every Boolean function be written algebraically?
Yes — the minterm construction from the truth table always works, which proves {+, ·, ′} is functionally complete.
The rest of Boolean Algebra
Axioms, laws, simplification and Boolean functions. Each subtopic below has its own method, worked example and mark-losing traps.
- 1Boolean axioms & laws
- 2The duality principle
- 3Simplifying Boolean expressions
- 4Boolean functions & truth tables
- 5Boolean algebra, logic & set algebra
- 6Sum-of-products & product-of-sums
- 7Karnaugh maps & minimal expressions
- 8Logic gates & translating circuits
- 9NAND / NOR universality
- 10Don’t-care conditions in minimisation
- 11Quine–McCluskey minimisation
- 12Half adders, full adders & multiplexers
- 13Shannon expansion & binary decision diagrams
Ready to make boolean functions & truth tables exam-proof?
Generate your first questions free — no card, no setup, no personal data stored. Practise until the method is second nature.
Start practising free →