How to Use the Truth Table Generator
Select a logic gate from the dropdown to instantly display the truth table for all combinations of inputs A and B (or just A for NOT). Supports AND, OR, NAND, NOR, XOR, XNOR, and NOT — the seven fundamental Boolean operations.
Logic Gate Summary
- AND: output 1 only when both A and B are 1
- OR: output 1 when at least one input is 1
- NAND: inverse of AND (universal gate)
- NOR: inverse of OR (universal gate)
- XOR: output 1 when inputs differ
- XNOR: output 1 when inputs are equal
Frequently Asked Questions
What makes NAND a universal gate?
NAND can implement every other logic gate — NOT, AND, OR, and combinations thereof — making it the sole building block needed for any digital circuit.
How does XOR differ from OR?
OR outputs 1 when at least one input is 1, including when both are 1. XOR outputs 1 only when exactly one input is 1 (inputs differ).
Does this tool support 3 or more variables?
This tool covers 2-variable (A, B) truth tables. With n variables, you need 2ⁿ rows — a 3-variable table has 8 rows and requires a separate tool.