Next / Previous / Contents / Shipman's homepage

2.2. Truth table with “don't care” entries

Here is the full truth table for the expression “A ∧ (B ∨ C)”.

ABCA ∧ (B ∨ C)
FFFF
FFTF
FTFF
FTTF
TFFF
TFTT
TTFT
TTTT

We can collapse this table down to five lines by using “X” to mean “don't care.”

ABCA ∧ (B ∨ C)
FXXF
TFFF
TFTT
TTFT
TTTT

Truth tables with X values in them are quite common in Cleanroom sequence primes. For example, if the first prime of a sequence raises an exception in some cases, any conditions governing execution of later primes in the sequence will have a don't-care value in the truth table, because if the first prime raises an exception the later primes will never be executed.

Reducing the number of rows in the truth table reduces the number of trace tables we have to build.