What are logic gates?
Logic gates are switches that turn ON or OFF depending on what the user is doing. They are the components that make up the way computers work. Logic gates are turn ON when a certain condition is true, and OFF when the condition is false. They check whether the information they get follows a rule or not. They spit out either the answer true (ON) or false (OFF).
Remember, True = ON = 1 False = OFF = 0
Let us say a certain logic gate needs to determine if two numbers are equal. The rule would be “is equal”. If the two input numbers are equal, it will go into its ON position and indicating true. If they are not equal and it will go into its OFF position, indicating false.
However, we learned before that computers only think of things in terms of ON and OFF, which to them is 1 and 0. So a computer wouldn’t take an input of 6 or 8 all of the information need to be 0 s and 1 s.
Input refers to the information you give the logic gate, and output refers to what it out.
Types of Logic Gates,
- XOR (Ex-OR)
- XNOR (Ex-NOR)
- NOT is the most simple logic gate.
- All it does is taking in an input that is either ON or OFF and spits out the opposite.
- Therefore, for a 1 it will give a 0, and for a 0 it will give a 1.
- Another name for a NOT gate is inverter, because it inverts (makes opposite) the input.
- Unlike NOT gate, AND needs two inputs.
- It only turns ON when both inputs are ON.
- If only one input is ON, it spits out OFF.
- If both inputs are OFF, it spits out OFF.
- OR also needs two inputs.
- OR needs one input to be ON for it to spit out ON.
- It is also, ON when both inputs are ON.
- It is OFF when both inputs are OFF.
XOR Gate (Ex-OR Gate)
- XOR is the short way to say “Exclusive OR”.
- XOR also only needs one input to be ON for it to spit out ON.
- But unlike OR, when both inputs are ON, XOR spits out OFF.
- It is also, OFF when both inputs are OFF.
- It is Opposite of AND gate, also needs two inputs.
- It turns ON when both inputs are OFF.
- If only one input is ON, it spits out ON.
- If both inputs are ON, it spits out OFF.
- It is Opposite of OR gate, also needs two inputs.
- It needs both input to be OFF for it to spit out ON.
- If only one input is OFF, it spits out OFF.
- It is OFF when both inputs are ON.
XNOR Gate (Ex-NOR Gate)
- It is Combination of XOR & NOT gates, also needs two inputs.
- If both inputs are either ON or OFF it spit out ON
- If only one input is OFF or ON, the XNOR spit out OFF.
Summary of logic gates
Summary of Logic function & Boolean notation
Stacking Logic Gates
• An output of one logic gate can be an input to another logic gate.
• This creates trees of gates that depend on each other.