3.1.5 · D5Boolean Algebra & Logic Gates
Question bank — Truth tables construction
Before you start, recall the three load-bearing ideas: rows because inputs are independent; you list combinations by counting in binary so nothing is skipped or repeated; and you evaluate with precedence NOT → AND → OR using intermediate columns.
True or false — justify
Every line below is a full claim. Decide true/false and say why before revealing.
A truth table for inputs has rows.
False. Rows are , so ; the trap is doing , but independent inputs multiply choices, they do not add.
If two Boolean expressions have the same truth table, they are logically equivalent.
True. The table is the complete promise of behaviour; matching every row means matching every possible input, so the functions are identical however differently they are written — this is how Boolean Algebra Laws are proven.
Changing the order of the rows changes what function the table represents.
False. The function is the set of (input → output) pairs; a different row order is the same set, hence the same function. Order only matters as a discipline so you don't skip or duplicate a case.
A -input table and a -input table can never describe the same function.
True in the strict sense — they have different input sets. But a -input function can ignore one input (its output never depends on it), making it behave like a -input function on the inputs that matter.
The rightmost input column always alternates every single row.
True in the standard convention. It is the least significant bit of the binary count, and the last bit flips on every increment.
The expression is evaluated as .
False. AND () binds tighter than OR (), exactly like before in arithmetic, so it means .
An all- input row can still produce output .
True. If the expression contains a NOT (e.g. ) or a constant , the output for all-zero inputs can be ; the output depends on the rule, not on the inputs being zero.
Two circuits that use different gates must have different truth tables.
False. Different physical constructions can implement the same function — e.g. and have the same table despite looking unrelated.
If a function's output column is all s, the function is the constant (a tautology).
True. Every input combination maps to , so the output never depends on the inputs — it is the constant "always true" function.
Adding one more input to a circuit adds one more row to its table.
False. Each new input doubles the rows (every old combination reappears with the new input and ), so , giving , not .
Spot the error
Each statement contains a flaw. Name the flaw and correct it.
"For with , the output is because ."
Error: it ignored the AND term. , and OR is if either side is , so . Never let one decide an OR.
"I'll write the input rows in whatever order I like; as long as all combinations appear, the table is correct."
The claim about values is fine, but the practice is dangerous: without the binary-counting checksum you are very likely to skip or duplicate a combination. Count in binary to guarantee completeness.
" is the same as , so I can NOT each variable separately."
Error: NOT does not distribute over AND like that. By De Morgan's law (the AND flips to OR). Build both tables and they differ — a classic trap.
"A -input XOR is when at least one input is ."
That describes OR, not XOR. XOR outputs when the inputs differ (exactly one is ); for both- it gives , so its column is .
"To evaluate I do the NOT last since it's written last."
Error: position in writing does not set precedence. NOT is evaluated first, then AND, then OR — so compute , then , then the final OR.
"Since AND outputs only in one row, OR must output in only one row too."
False parallel. For inputs, AND is in row (both ), but OR is in rows (any input ); they are opposite in how "generous" they are.
Why questions
Answer with a reason, not a definition.
Why is the number of rows rather than or ?
Because the inputs are independent and each has choices, the multiplication principle gives ; neither adding nor squaring reflects "independent choices multiply".
Why do we build intermediate columns instead of evaluating the whole expression at once?
Splitting into small sub-expressions forces correct precedence and turns a mistake-prone mental leap into a mechanical fill-in, dramatically cutting evaluation errors — see Logic Gates AND OR NOT where each gate is one small column.
Why is counting in binary the "safe" way to list input combinations?
The binary numbers to are all distinct and cover every value in that range exactly once, so padding each to bits produces every combination with no gaps and no repeats — a built-in checksum. This is exactly the Binary Number System doing the bookkeeping.
Why can a truth table serve as the "ground truth" for simplification?
Because the table captures behaviour completely and uniquely; any simplified expression is only valid if it reproduces the same table, so the table is the reference every Boolean Algebra Laws step must respect.
Why does NOT get evaluated before AND and OR?
NOT acts on a single value to produce the operand that AND/OR then combine; you must know each variable's actual value (possibly inverted) before combining, so inversion has to come first — mirroring how unary minus resolves before and .
Why does the rows-double argument prove so cleanly?
Starting from and , each step multiplies by ; applying it times from the base gives , a clean geometric growth rather than a guess.
Why can the rows where output be read directly as a Sum of Products?
Each -row corresponds to one exact input combination, written as an ANDed product; ORing all such products gives an expression that is on precisely those rows and nowhere else — the basis of Sum of Products (SOP).
Edge cases
Boundary and degenerate scenarios the topic quietly assumes you've considered.
How many rows does a truth table with inputs (a constant) have?
row. A constant function still has one "empty" input combination with a fixed output — the formula holds even at the smallest case.
What does the truth table of the constant function look like?
Every row's output is regardless of inputs; the output column is all s because the expression never references any input.
If an expression contains a variable that never affects the output (e.g. ), what happens in the table?
The output column is identical for that variable's and values in every otherwise-matching row, so the variable is redundant — the function ignores it entirely.
For a -input NOT gate, what are the two rows and outputs?
With rows: input output , and input output ; NOT simply flips the single input.
If two adjacent rows differ in output despite differing in only one input bit, what does that tell you?
That single input bit does affect the output — a signal used by Karnaugh Maps, where such adjacent differing cells mark where the function is "sensitive" and cannot be merged.
What is the largest input combination (as a binary count) in an -input table, and why?
It is (all s), because counting starts at ; you list , so the final row is the all-ones combination.
If you accidentally write rows, what must have gone wrong?
You duplicated at least one input combination, since the exhaustive list has exactly distinct combinations — any extra row is a repeat, caught by re-counting in binary.
Connections
- Logic Gates AND OR NOT — each gate is one atomic truth table you combine.
- Boolean Algebra Laws — every law is a claim that two tables match.
- Sum of Products (SOP) — read straight off the output- rows.
- Karnaugh Maps — the same table redrawn to expose adjacent-row structure.
- Binary Number System — the counting that guarantees complete input rows.
- Combinational Logic Circuits — the hardware a truth table describes.