Computing Library › Classical Logic Gates
Classical Logic Gates

Truth Tables

A truth table lists every possible input combination and the output the circuit produces, defining a Boolean function exactly.

What a truth table is

A truth table is an exhaustive lookup. For a function of n inputs there are 2 to the n rows, one per combination. The table pairs each combination with the output, leaving nothing to interpretation.

Counting the rows

Kronos motion — classical

One input gives 2 rows, two inputs give 4, three give 8, four give 16. Rows are conventionally listed in binary counting order, so the input columns read like a binary counter from all zeros to all ones.

Example: two-input AND

ABA AND B
000
010
100
111

Why they matter

From table to expression

Each row that outputs 1 contributes one product term, called a minterm, in which every input appears either plain or complemented. ORing these minterms reproduces the function. The dual reading, using the rows that output 0, gives a product-of-sums form.

Because a truth table grows exponentially with input count, large functions are usually specified more compactly, but for a handful of inputs the table remains the clearest and most reliable description.