Electronics/Basic gates
This page is brought to you by Wikimedia Laboratories
Overview
There are five different types of gate at the most simple stage:
- AND
- OR
- NOT
- NAND
- NOR
- XOR
(NB: They should always be referenced in capitals)
The explanations below are for fully digital operation. See below for practical limitations and information (i.e., trip points.)
All logic functions can be implemented using only:
- AND, OR, NOT
- NAND
- NOR
Explanation of the gates' operation
1. AND Gate
- The AND gate's output is 1 if both of its two inputs are 1; otherwise, the output will be 0
| A | B | X |
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
2. OR Gate
- The OR gate's output is 1 if either of its two inputs are 1; otherwise, the output is 0
| A | B | X |
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
3. NOT Gate
- The output from the NOT gate is always equal to the opposite of the input
| A | X |
| 0 | 1 |
| 1 | 0 |
4. NAND Gate
- As if a NOT gate had been stuck on the end of an AND gate; i.e., if both inputs are 1, the output will be 0, else it will be 1
| A | B | X |
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
5. NOR Gate
- As if a NOT gate had been stuck on the end of an OR gate; i.e., if either input is 1, the output will be 0, else it will be 1
| A | B | X |
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 0 |
6. XOR gate
- This gate is identical to the OR gate except for when the inputs are the same - in this case it is 0 as well
| A | B | X |
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
