Introduction
logic gate are the basis of a computer hardware. Without the invention of logic gate, computers can't be designed... not even any electronic devices. A logic gate only produces one output but can have multiple inputs. It processes the input boolean value(s) by a logical operation such as AND, OR, NOT, XOR and so on.
Be careful! Boolean circuit wise, when we say "give an value", it means that the logic gate produces a TRUE value. Because logic True and logic False are physically represented by voltage - no or low voltage is False (0), and high voltage indicates True (1). So give an value means "high voltage".
In the article, we will use 1s / 0s, high / low voltage, and give an value / not give an value interchangeably. Also, the website that we use to show logic gate is: Logic.lyhttps://logic.ly/demo/ you can have a play with it.
basic gates
AND gate
what is logic AND? It gives an value only when both inputs are true, which means that only for input 1, 1 it produces 1. For example, you say: I own a extravagent mansion AND I am paid 100,000 pounds annually. So only when both conditions are satisfied, you statement is true.
OR gate
waht is logic OR? the logic gate produces 1 when at least one of the two (multiple) inputs is true, which means that for 0,1 or 1,0 or 1,1, the gate will produce a true value. For example, you tell a fairy: I want a high salary or a big house. She only needs to realise at least one of your wishes.
NOT gate
A NOT gate is very simple. for any value inputed, the gate gives the reversed output.