How do you work out logic gates?
Explanation:
An electric current can flow through a transistor when it is turned on or open. When it is turned off, no current flows. When you connect several of these transistors together, you produce what's known as a logic gate, which allows you to add, subtract, multiply, and split binary values in any way you can think of.
Therefore,
There are several types of logic gates, including:
The following tables illustrate the output produced by these logic gates:
AND:
Input 1 | Input 2 | Output |
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
OR:
Input 1 | Input 2 | Output |
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
NOT:
Input | Output |
0 | 1 |
1 | 0 |
XOR:
Input 1 | Input 2 | Output |
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
NAND:
Input 1 | Input 2 | Output |
0 | 0 | 1 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
Hence, this is the way to work out logic gates.