Truth tables show the output of logic (boolean) operations for every combination of inputs. This page lists AND, OR, XOR, NAND, NOR and XNOR for two inputs, plus NOT — the foundation of digital logic and programming conditions.
| A | B | AND | OR | XOR | NAND | NOR | XNOR |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 0 | 1 | 1 | 1 | 0 | 0 |
| 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 |
| 1 | 1 | 1 | 1 | 0 | 0 | 0 | 1 |
NOT
| A | NOT A |
|---|---|
| 0 | 1 |
| 1 | 0 |