Truth table vs decision table
The same discount rule as a truth table and as a decision table: eight rows with three TRUE, or a handful of business rules with conditions and actions. One is for checking, the other for talking, and the engine's normal forms show where the two meet.
The rule is (student OR senior) AND NOT expired. Its truth table has eight rows and is TRUE on rows 2, 4 and 6, Σm(2, 4, 6): the senior, the student, and the person who is both, each with a valid card. The exact checks confirm the rule is contingent. A decision table lists the three conditions as rows and the business rules as columns: valid card and student, discount; valid card and senior, discount; expired, no discount whatever else holds; neither student nor senior, no discount.
The engine's disjunctive normal form is the decision table's TRUE columns written as a formula: (student AND NOT expired) OR (senior AND NOT expired), two terms, and the Karnaugh map derives the same two groups. The conjunctive normal form is the rule itself, (student OR senior) AND NOT expired, two clauses, which is the decision table's conditions read as constraints. Both normal forms are the decision table in a different typography.
Gate counts show the asymmetry that makes the rule cheap in hardware: two NOR gates implement it, against eleven NAND, because the rule is an OR followed by an AND with a negation, which is what a NOR does natively. The testing section's page on the pair covers when to use which table; this page is the function itself seen both ways.
Example
discount := (student OR senior) AND NOT expired · output
Exact checks
Truth table (8 rows)
| # | student | senior | expired | discount |
|---|---|---|---|---|
| 0 | FALSE | FALSE | FALSE | FALSE |
| 1 | FALSE | FALSE | TRUE | FALSE |
| 2 | FALSE | TRUE | FALSE | TRUE |
| 3 | FALSE | TRUE | TRUE | FALSE |
| 4 | TRUE | FALSE | FALSE | TRUE |
| 5 | TRUE | FALSE | TRUE | FALSE |
| 6 | TRUE | TRUE | FALSE | TRUE |
| 7 | TRUE | TRUE | TRUE | FALSE |
Logic diagram
Karnaugh map
- cells m4, m6
student AND NOT expired - cells m2, m6
senior AND NOT expired
Minterms and maxterms
discount(student, senior, expired) = Σm(2, 4, 6)discount(student, senior, expired) = ΠM(0, 1, 3, 5, 7)Variable order: student, senior, expired · 8 rows
Normal forms
Conjunctive normal form (CNF)
(student OR senior) AND NOT expired2 clauses, 3 literals · complete
Disjunctive normal form (DNF)
(student AND NOT expired) OR (senior AND NOT expired)2 terms, 4 literals · complete · Distribution ×1
NAND-only and NOR-only
NAND-only form
NAND(NAND(NAND(NAND(student, student), NAND(senior, senior)), NAND(expired, expired)), NAND(NAND(NAND(student, student), NAND(senior, senior)), NAND(expired, expired)))11 gates · verified equivalent on every row
NOR-only form
NOR(NOR(student, senior), expired)2 gates · verified equivalent on every row
The common slip
Building the decision table from the truth table by copying rows instead of grouping them. A decision table with eight columns is a truth table turned sideways; its value is in the collapsed columns, and the engine's two-term normal form says how many there are.
Questions
Why are the DNF and the map the same here?
Because the function has exactly two prime implicants and both are needed; the algebraic conversion and the grouping arrive at the same cover. On other functions the map can be shorter, as the CNF-versus-DNF comparison shows.
Which rows become tests?
The independence pairs: one per condition, four scenarios for three conditions. The decision-table testing example in the testing section walks through the same step for a shipping rule.
Related
See also
- Decision table vs truth table: when to use which
- Decision table testing, worked example (ISTQB Foundation 4.2.3 style)
- Decision table: meaning and examples
- Truth table: meaning and examples
- Discount eligibility rule: (student OR senior) AND NOT expired AND (member OR coupon)
- NAND vs NOR as the universal gate
- Decision table exercises with answers (ISTQB style)
Compare
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.