← Digital logic calculators

DIGITAL LOGIC / TRUTH TABLES

Truth Table Generator for Boolean Logic Expressions

Type your own logic expression and generate every input row, each intermediate subexpression and the final output. The tool also lists minterms and maxterms, checks whether two expressions are equivalent and exports the completed truth table as CSV or LaTeX.

Enter one or more Boolean expressions

Use variables A–H and operators NOT, AND, OR, XOR, NAND, NOR, XNOR, → or ↔. Apostrophes and implicit AND such as A′B are supported.

Worked truth table examples

Each example shows the expected result before opening the same problem in the generator. Use them to check notation, row order and common Boolean identities.

De Morgan’s law

NOT(A AND B) compared with NOT A OR NOT B.

Both output columns are 1110, proving the expressions equivalent.

Negating an AND changes it to OR and complements both inputs.

Load this comparison →

Material implication

A → B

Rows 00, 01, 10, 11 produce 1101.

An implication is false only when A is true and B is false; its minimum form is A′ + B.

Load implication →

Exclusive OR

A XOR B

The output signature is 0110.

XOR is true when exactly one input is true, giving minterms 1 and 2.

Load XOR →

Tautology test

A OR NOT A

The output signature is 11: true on every row.

A variable must be either 0 or 1, so it or its complement always holds.

Load tautology →

Distributive equivalence

A AND (B OR C) compared with (A AND B) OR (A AND C).

Both expressions produce 00000111.

The comparison checks all eight rows, so matching columns are a complete equivalence proof.

Load distributive comparison →

Full adder with two outputs

SUM = A XOR B XOR C
CARRY = AB + AC + BC

SUM is 01101001; CARRY is 00010111.

Both functions share the same eight input rows, making a multi-output table easier to compare.

Load full adder →

How the truth table generator works

The generator identifies each variable, creates all binary input combinations and evaluates the expression in operator order. With n variables, the table contains 2ⁿ rows. Intermediate columns expose the value of each subexpression instead of showing only the final answer.

Supported Boolean logic symbols

You can enter words such as NOT, AND, OR and XOR or use logic symbols including ¬, ∧, ∨, ⊕, → and ↔. Apostrophe notation such as A′ and implicit multiplication such as AB are also accepted. Parentheses are recommended whenever an expression could be read in more than one way.

Worked truth table example

For the implication A → B, the output is false only when A is true and B is false. The resulting output column is 1, 1, 0, 1 for input rows 00, 01, 10 and 11. Its canonical SOP is A′B′ + A′B + AB, while the minimal form is A′ + B.

Minterms, maxterms and canonical forms

A minterm identifies one input row where the function is 1; a maxterm identifies one row where it is 0. Canonical SOP joins all minterms with OR, while canonical POS joins all maxterms with AND. These systematic forms are useful for moving between a truth table, a K-map and a logic circuit.

Tautology, contradiction and contingency

A tautology is true for every row. A contradiction is false for every row. A contingency contains both outputs, which is the usual case for a practical logic function.

Check whether two expressions are equivalent

Enable comparison to evaluate both expressions over the same combined variable set. If every output matches, the functions are equivalent. If not, the result includes the first input assignment that proves the difference.

Use the results in other tools

Copy the table for a document, download CSV for a spreadsheet or export LaTeX for coursework. The canonical and minimum forms link directly to the Karnaugh map solver for visual grouping and circuit analysis.

Truth table generator frequently asked questions

How many rows does a truth table need?

A table with n distinct variables needs 2ⁿ rows. Four variables require 16 rows and eight require 256.

Which Boolean operators can I enter?

The parser supports NOT, AND, OR, XOR, NAND, NOR, XNOR, implication and equivalence, including common symbols such as ¬, ∧, ∨, ⊕, → and ↔.

What does an intermediate column show?

It records one subexpression for every input assignment, making operator order and mistakes easier to inspect.

Can this truth table generator compare two expressions?

Yes. It evaluates both expressions over the same variables and reports either equivalence or the first counterexample.

What is the difference between a minterm and a maxterm?

A minterm corresponds to one row where the function is 1. A maxterm corresponds to one row where it is 0.

Can I export the generated truth table?

Yes. Copy it as tab-separated text, download CSV or copy a LaTeX array.