**Basic gates **

There are three basic gates in digital electronics. These are NOT gate, AND gate & OR gate.

** NOT gate / Inverter:** NOT gate is called inverter also. Operation of NOT gate is if input is high output is low and if input is low then output is high. Another words output is always inverse or toggle of input. So it is called inverter. Circuit diagram of inverter is given below Here input is A output is

** Truth table of NOT gate:** From truth table we can say that NOT gate shows output high if the input low and shows output low if the input high. Example: A is an input signal for NOT gate in black color and X is the output signal in red color. It is clear NOT gate always reverses its input signal.

**OR gate:** The output is high if any input is high for OR gate operation. Only output is low when all input is low. If input A, B and output is X. Then the operation is written in with plus (+).

Mathematically X = A+B

** Truth table of OR gate :** Here two inputs are shown in the table. For first case where two inputs are low, output also low. But all outputs are high because any one input is high. Example: A and B are the input here. If one input is high then output is high. Output wave X shows that.

**AND gate: **When all inputs are high output is high in AND gate. If one input is low then output low. Diagram of AND gate is **Truth table of AND gate:**

For two inputs a truth table is show below AND operation is written multiple with the inputs. For input A, B and output X the operation is X=AB or X=A.B Example: From output signal where the two inputs are high output also high. Otherwise all area are low in AND gate.

**NOR gate:** NOR gate is opposite of OR gate. NOR gate gives high output when all inputs are low. Diagram of NOR gate approximately same only one change that a single bubble used in output bar. NOR gate operation written

**Truth table of NOR gate: ** truth table shows only when all inputs are low then output high. Example: NOR gate produces low when any one of input is high.

**NAND gate:** NAND gate also opposite of AND gate. NAND gate produces high if all input are low otherwise all output are high. Diagram of NAND gate similar to AND gate only one change that is one bubble used to output terminal. NAND operation written in

**Truth table:** Example: **XOR gate:** XOR gate means exclusive OR gate. When both inputs are opposite logic level only then output are high. Expression of XOR gate written as alternatively written **Truth table:** Example: If one input is high then output is high for XOR gate.

**XNOR gate:** In XNOR gate when all input are same logic level then output is high. Expression written as alternative expression **Truth table: ** Table shows output high when two inputs are low and two inputs are high. Example: