Skip to content

Decision table vs truth table: when to use which

A truth table lists every combination of a rule's inputs with the output on each row. A decision table groups those rows into business rules with conditions and actions. For a Boolean rule they carry the same information; they differ in who reads them and how many rows survive.

The discount rule below, (student OR senior) AND NOT expired, has three inputs and therefore eight truth-table rows, of which three give the discount: a senior with a valid card, a student with a valid card, and someone who is both. The exact checks on the page confirm that the rule is neither always true nor always false, and give the witness student = FALSE, senior = TRUE, expired = FALSE as one row where it holds.

A decision table for the same rule, in the style testers learn for certification, collapses rows that share an outcome and a reason. “Expired, any status: no discount” covers four truth-table rows with one business rule, and “valid card, student or senior: discount” covers three with another. The result is shorter and readable by the people who own the rule, at the price of hiding the individual combinations, which is exactly where the slips in the pitfall pages live.

The practical rule is to write the decision table for the conversation and generate the truth table for the check. The engine builds the full table from the rule, the comparison page on this pair shows both forms for one function, and the ISTQB-style worked example turns a decision table into test cases row by row.

Example

discount := (student OR senior) AND NOT expired · output

Exact checks

Always true (tautology)? No Counterexample: student = F, senior = F, expired = F · Exhaustively checked and solver cross-checked · 1 rows
Always false (contradiction)? No Counterexample: student = F, senior = T, expired = F · Exhaustively checked and solver cross-checked · 3 rows
Can be true? Yes Example assignment: student = F, senior = T, expired = F · Exhaustively checked and solver cross-checked · 3 rows

Truth table (8 rows)

Decision table vs truth table: when to use which
#studentseniorexpireddiscount
0FALSEFALSEFALSEFALSE
1FALSEFALSETRUEFALSE
2FALSETRUEFALSETRUE
3FALSETRUETRUEFALSE
4TRUEFALSEFALSETRUE
5TRUEFALSETRUEFALSE
6TRUETRUEFALSETRUE
7TRUETRUETRUEFALSE

Plain-language reading

Beginnerdiscount is true exactly when both of the following hold:
1. at least one of student or senior is true (both may be true)
2. expired is false
In every other case, discount is false.
About the operators:
- AND is true only when all of its parts are true.
- OR is inclusive: it is true when at least one part is true, including when several are.
- NOT reverses a value: true becomes false and false becomes true.
Intermediatediscount is true exactly when both of the following hold:
1. at least one of student or senior is true (both may be true)
2. expired is false
In every other case, discount is false.
Advanceddiscount is true exactly when both of the following hold [conjunction ∧]:
1. at least one of student or senior is true (both may be true) [inclusive disjunction ∨]
2. expired is false [negation ¬]
In every other case, discount is false.
Formal notation: (student ∨ senior) ∧ ¬expired

Logic diagram

Decision table vs truth table: when to use which Decision table vs truth table: when to use which student senior expired discount AND OR NOT
Decision table vs truth table: when to use which Decision table vs truth table: when to use which student senior expired discount AND OR NOT

The common slip

Collapsing rows in a decision table by reasoning rather than by checking. “Expired, any status: no discount” is right for this rule only because NOT expired is a top-level AND; move it inside a bracket and the collapsed rows no longer share an outcome.

Questions

How many rows does a decision table need?

At most one per combination of conditions, which is the truth table, and usually far fewer after collapsing. The minimum is the number of distinct outcomes with distinct reasons, which the Karnaugh map's groups also count.

Can the engine produce a decision table?

It produces the truth table, with exports to CSV and Markdown, and the Karnaugh map groups show which rows can be collapsed. The grouping into business rules, with the wording of conditions and actions, is yours to write.

Related

See also

Testing and rules

Generated from the Tangibool engine, semantics tangibool-semantics/1, engine 1.0.0, build . Every table, map, simplification and verdict on these pages was computed by the Tangibool engine when the site was built, and every claim was re-checked by the same exact checker the app uses. Limits are stated where they apply. © 2026 Foreranger LTD.