🎓 Computer Science • Logic 100% Client-Side Privacy

Truth Table Generator

Generates exhaustive truth tables for multi-variable boolean logic propositions with 2 or 3 inputs.

Presets:
Truth Table (4 Minterm Rows)
mABOutput (Y)
m0000
m1011
m2101
m3110
Canonical Sum of Products (SOP / Minterms)
Σ m(1, 2)
Canonical Product of Sums (POS / Maxterms)
Π M(0, 3)

What is a Truth Table?

A truth table is a mathematical table used in logic and computer science to determine all possible functional truth values of boolean statements.

Formula & Step-by-Step Calculation

Rows = 2^n (where n is the number of boolean variables)

Exhaustive combination of binary inputs.

Worked Step-by-Step Examples

Example 1

Generate truth table for XOR (A ⊕ B)

Solution: 0⊕0=0, 0⊕1=1, 1⊕0=1, 1⊕1=0
• Outputs 1 only when inputs differ

Common Real-World & Academic Use Cases

  • ✓ Verifying digital adder logic circuits
  • ✓ Propositional calculus logic homework
  • ✓ Safety-critical software condition testing

How to Use the Truth Table Generator

1

Select Operator

Choose AND, OR, XOR, NAND, NOR, or XNOR.

2

Choose Variable Count

Toggle 2 inputs (A, B) or 3 inputs (A, B, C).

3

Inspect Truth Matrix

Review all input combinations and calculated outputs.

Frequently Asked Questions

Q: Why is NAND called a universal gate?

Because any boolean function or logic gate (AND, OR, NOT, XOR) can be constructed using only NAND gates.

Related Computer Science Calculators