AND, OR, NOT, NAND, NOR gates
AND, OR, NOT, NAND, NOR Gates AND Gate: The AND gate combines two binary inputs to produce a single output that is 1 if both inputs are 1 . Th...
AND, OR, NOT, NAND, NOR Gates AND Gate: The AND gate combines two binary inputs to produce a single output that is 1 if both inputs are 1 . Th...
AND Gate:
The AND gate combines two binary inputs to produce a single output that is 1 if both inputs are 1.
Think of it as a "logical AND" operation, where two people agree to the same thing.
The truth table for AND is:
| Input 1 | Input 2 | Output |
|---|---|---|
| 1 | 1 | 1 |
| 1 | 0 | 0 |
| 0 | 1 | 0 |
| 0 | 0 | 0 |
OR Gate:
The OR gate combines two binary inputs to produce a single output that is 1 if at least one input is 1.
Think of it as a "logical OR" operation, where two people agree at least one of the same things.
The truth table for OR is:
| Input 1 | Input 2 | Output |
|---|---|---|
| 1 | 1 | 1 |
| 1 | 0 | 1 |
| 0 | 1 | 1 |
| 0 | 0 | 0 |
NOT Gate:
The NOT gate takes a single input and produces a single output that is opposite the input.
Think of it as a "logical negation" operation, where we flip the truth value of the input.
The truth table for NOT is:
| Input | Output |
|---|---|
| 1 | 0 |
| 0 | 1 |
NAND Gate:
The NAND gate is a combination of the AND gate and the NOT gate.
It combines two inputs and produces a single output that is 1 only if both inputs are 1.
The truth table for NAND is:
| Input 1 | Input 2 | Output |
|---|---|---|
| 1 | 1 | 0 |
| 1 | 0 | 0 |
| 0 | 1 | 0 |
| 0 | 0 | 1 |
NOR Gate:
The NOR gate is a combination of the OR gate and the NOT gate.
It combines two inputs and produces a single output that is 0 only if both inputs are 0.
The truth table for NOR is:
| Input 1 | Input 2 | Output |
|---|---|---|
| 1 | 1 | 0 |
| 1 | 0 | 0 |
| 0 | 1 | 0 |
| 0 | 0 | 1 |