A truth table lists the output for every allowed input combination. Two independent binary inputs produce four rows; three produce eight. Keep a fixed input order, then evaluate each gate or intermediate node consistently.
Reviewed 12 November 2026 · Binary examples checked with executable tests.
On this page
What is the complete two-input gate table?
| A | B | AND | OR | NAND | NOR | XOR | XNOR |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 |
| 0 | 1 | 0 | 1 | 1 | 0 | 1 | 0 |
| 1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 |
| 1 | 1 | 1 | 1 | 0 | 0 | 0 | 1 |
Read one row across before moving down. At A=B=1, AND and OR both produce 1, NAND and NOR produce 0, XOR produces 0 and XNOR produces 1. This row is a useful check against confusing XOR with OR.
How does the NOT gate differ?
NOT is unary: Y=NOT A. Its table has only two rows, 0→1 and 1→0. Adding a redundant second input column does not turn NOT into a two-input function.
| A | NOT A |
|---|---|
| 0 | 1 |
| 1 | 0 |
A tied-input NAND also inverts: NAND(A,A)=NOT A. Both inputs receive the same signal, so only the 00 and 11 rows of the NAND table can occur in that circuit.
How do you build a table for several connected gates?
For Y=(A OR B) AND NOT C, add an intermediate column for A OR B and another for NOT C. This prevents an inversion at the last stage from being applied to the whole circuit by mistake.
| A | B | C | A OR B | NOT C | Y |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 | 0 |
| 0 | 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 1 | 1 |
| 0 | 1 | 1 | 1 | 0 | 0 |
| 1 | 0 | 0 | 1 | 1 | 1 |
| 1 | 0 | 1 | 1 | 0 | 0 |
| 1 | 1 | 0 | 1 | 1 | 1 |
| 1 | 1 | 1 | 1 | 0 | 0 |
Check two useful properties: every row with C=1 has Y=0, and every row with C=0 has Y equal to A OR B. These properties provide a second way to check the enumerated answers.
What do X and unknown values mean?
In a device function table, X often means “this input does not affect the specified result.” In a four-state HDL simulation, X usually represents an unknown or conflicting value. Those meanings are different. Do not copy an X from a datasheet into a simulation and assume it behaves like an arbitrary, stable binary digit.
The tables here intentionally enumerate only 0 and 1. Unconnected inputs, metastability and electrical contention need additional device and timing analysis. A don't-care used for Boolean simplification is an explicit design assumption about which cases matter.
How can you check a truth table yourself?
- Write all 2n binary combinations in a consistent order.
- Evaluate every intermediate node, keeping inversion brackets explicit.
- Check special cases such as all-zero, all-one and an asserted enable or inhibit.
- Compare a second formulation, such as De Morgan's identity or arithmetic for an adder.
The downloadable lab tests check all four two-input rows, the half-adder cases and all eight full-adder inputs. For an explanation of symbols and physical limits, use the companion logic-gate guide.
Additional circuit views
Common questions
Why are there four rows for two inputs?
Each input can independently be 0 or 1, giving 2 × 2 = 4 combinations: 00, 01, 10 and 11.
Why is XOR different from OR at 11?
OR asks whether at least one input is 1. Two-input XOR asks whether the inputs differ. Both inputs being 1 satisfies OR but not XOR.
Does a truth table include propagation delay?
No. It describes the functional input-output relationship. Timing diagrams and electrical specifications describe when outputs become valid.
References and checks
- Analog Devices: logic-gate definition
- Texas Instruments: SN74HC86 XOR datasheet
- Texas Instruments: SN74HC00 NAND product and datasheet
Download the functional tests and model source. These check stated binary functions; they do not establish analog timing, physical implementation, fault coverage or board behavior.