Buffer
The output copies the input.
Y equals A
| A | Y |
|---|---|
| 0 | 0 |
| 1 | 1 |
Parts and wires of the circuit. The levels of the outputs are listed below the board.
A logic gate turns one or more input bits into an output bit. The symbols are the traditional distinctive shapes. In the expressions, · is AND, + is OR, ⊕ is XOR and a bar over a term is NOT.
The output copies the input.
Y equals A
| A | Y |
|---|---|
| 0 | 0 |
| 1 | 1 |
The output is the opposite of the input. A NOT gate is also called an inverter, and the small circle on a symbol means inversion.
Y equals not A
| A | Y |
|---|---|
| 0 | 1 |
| 1 | 0 |
The output is 1 only when every input is 1.
Y equals A and B
| A | B | Y |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
The output is 1 when at least one input is 1.
Y equals A or B
| A | B | Y |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
AND followed by NOT: the output is 0 only when every input is 1. NAND gates alone can be combined into every other gate.
Y equals the inverse of: A and B
| A | B | Y |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
OR followed by NOT: the output is 1 only when every input is 0. NOR gates alone can also be combined into every other gate.
Y equals the inverse of: A or B
| A | B | Y |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 0 |
Exclusive OR: with two inputs, the output is 1 when the inputs differ. With more inputs it is normally built as a chain of two-input XOR gates, so the output is 1 when an odd number of inputs are 1.
Y equals A exclusive or B
| A | B | Y |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
XOR followed by NOT: with two inputs, the output is 1 when the inputs are equal.
Y equals the inverse of: A exclusive or B
| A | B | Y |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
Real gates take a short time to respond to a change, called the propagation delay, and it varies with conditions. Circuit timing is often counted in gate delays, one step for each gate a change passes through. That delay is why an odd number of NOT gates in a loop oscillates: each change runs around the loop and comes back inverted.