Skip to content

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

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)

Truth table vs decision table
#studentseniorexpireddiscount
0FALSEFALSEFALSEFALSE
1FALSEFALSETRUEFALSE
2FALSETRUEFALSETRUE
3FALSETRUETRUEFALSE
4TRUEFALSEFALSETRUE
5TRUEFALSETRUEFALSE
6TRUETRUEFALSETRUE
7TRUETRUETRUEFALSE

Logic diagram

Truth table vs decision table Truth table vs decision table student senior expired discount AND OR NOT
Truth table vs decision table Truth table vs decision table student senior expired discount AND OR NOT

Karnaugh map

student \ seniorexpired
00
01
11
10
0
0m0
0m1
0m3
1m2
1
1m4
0m5
0m7
1m6
  1. cells m4, m6student AND NOT expired
  2. cells m2, m6senior AND NOT expired
(student AND NOT expired) OR (senior AND NOT expired) · Derived (student AND NOT expired) OR (senior AND NOT expired). Exactly equivalent on every assignment.

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 expired

2 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

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.