**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:

## OR GATE

Boolean algebra is a means for expressing the relationship between a logic circuit’s inputs and outputs.

Digital circuits called logic gates circuits can be constructed from diodes, transistors and resistors connected so that the circuit output is the result of a logic operation (OR.AND, NOT).

A truth table is a means for describing how a logic circuit’s output depends on the logic levels present at the circuit’s inputs.

The OR GATES is the first of the three basic Boolean operations to be learned. The truth table in figure-1 shows what happens when two logic inputs, A and B are combined using the OR operation to produce the output x.The table shows that x is a logic 1 for every combination of input levels where one or more inputs are1.The only case where x is a 0 is when both inputs are 0.

The Boolean expression for the OR operation is:

x=A +B

In this expression, the + sign does not stand for ordinary addition; it stands for the OR operation. The OR operation is similar to ordinary addition except for the case where A and B are both 1; the OR operation produces 1+1=1, not 1+1=2.

In Boolean algebra, 1 as high as we go, so we can never have a result greater than 1.The same holds true for combining three inputs using the OR operation. Here we have x=A+B+C. If we consider the case where all three inputs are 1, we have

x = 1+1+1=1

The expression x=A+B is read as “x equals A OR B”, which means that x will be 1 when A or B both are 1.Likewise, the expression x=A+B+C is read as “x equals A OR B OR C”, which means that x will be 1 when A or B or C or any combination of them are 1.

A | B | x =A+B |

0 | 0 | 0 |

0 |
1 | 1 |

1 | 0 | 1 |

1 | 1 | 1 |

**Fig-1: Truth table**

In digital circuitry, an OR gate is a circuit that has or more inputs and whose outputs is equal to the OR combination of the inputs.Figure-1 is the logic symbol for a two-input OR gate.

Using the language of Boolean algebra, the output x can be expressed as x=A+B+C.

A | B | C | x=A+B+C |

0 | 0 | 0 | 0 |

0 | 0 | 1 | 1 |

0 | 1 | 0 | 1 |

0 | 1 | 1 | 1 |

1 | 0 | 0 | 1 |

1 | 0 | 1 | 1 |

1 | 1 | 0 | 1 |

1 | 1 | 1 | 1 |

**Fig-2: 3 input OR Gate symbol**