NAND
Inputs
| Pin | Type | Description |
|---|---|---|
| A | bit | First input signal |
| B | bit | Second input signal |
Outputs
| Pin | Type | Description |
|---|---|---|
| Q | bit | Result: 0 only when A=1 and B=1 |
How It Works
NAND outputs 0 only when both inputs are 1. It is a universal gate — NOT, AND, OR, and XOR can all be built from NAND gates alone.
Truth Table
| A | B | Q |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
Usage
Available as a basic component. To build a NOT gate: connect both inputs together. To build an AND gate: feed the NAND output into a NOT gate.