Logic gates are just systems with two (or one) inputs and one output.
They can be made for electricity like we have in computers but also for all sorts of other stuff like water flowing in pipes or red stone in minecraft.
They are at their most basic level a system that you put in one or two yes or no type signals and get a yes or no type signal out.
For example an AND logic gate outputs “yes” if an only if both inputs are “yes”.
An OR logic gate outputs “yes” if an if one or both inputs are “yes”.
A XOR logic gate outputs “yes” if an if one but not both inputs are “yes”.
And so on.
There is also the very simple NOT gate that outputs the opposite of what you put in Yes into No and No into Yes.
You can make these logic gates from transistors but in the past we have also made them with vacuum tubes and electronically relays.
What they are made of does not really matter much they all function the same way.
Once you have logic gates, you can build more complicated structures from them.
For example by connecting two XOR, two AND and one OR gate together you can create a circuit that can add two binary digits. (You can also use 9 NAND gates for the same results)
Once you have that you can chain those adders together to get a design that you can put two numbers in and get the result of their addition out.
You can similarly create a circuit that will multiply numbers from logic gates.
Eventually if you can connect enough of them together you get a full general digital computer.
Latest Answers