- Logic gates are most fundamental digital circuits.They can be constructed from diodes, transistors, vacuum tubes and resistors.
- In electronics
**, a logic gate is a device that performs a logical operation on one or more binary inputs and produces a single binary output.** - How a logic gate will function can be represented by a Boolean expression. A
**Boolean expression**is a logical statement that results in a value of either TRUE or FALSE . **Truth table**can be defined as the table which describes, how output of the circuit depends on its inputs.It contains all possible input combination with their corresponding outputs. Number of inputs combinations is equal to 2^{n }for n number of inputs.Example, if number of inputs are two ,then total possible combinations of inputs are 2^{2 }=4.(i.e. 00,01,10,11)**logic gates**can be classified as,**1)BASIC GATES(NOT, AND, OR)****2)UNIVERSAL GATES(NAND ,NOR )****3)OTHER GATES(****EXOR,****EXNOR**)- LOGIC “0” and LOGIC “1” represents ” logic levels”shown in table below.

logic”1″(represents) |
logic”0″(represents) |

high | low |

yes | no |

on | off |

closed switch | open switch |

true | false |

^{BASIC GATES}

**1) NOT GATEDefined as : **It has single input (A)and single output(Y).Its logic level is always opposite of the logic level of its input.It is also known as an inverter. Not operation is also known as

**inversion**or

**complementation**. It symbol is shown below.

**Logic symbol :**

**Boolean Expression :**Its logic equation is written as

**Y=NOT A**

**= A’**

**Truth Table :**Truth table for NOT gate ,

A (INPUT) |
Y (OUTPUT) |

0 | 1 |

1 | 0 |

**Switching circuit diagram (for NOT gate) :**when switch is closed (i.e. at logic 1), then bulb does not glows (i.e. logic is 0).

when switch opens (i.e. logic 1 ), bulb glows(i.e. logic 0)

**2) AND GATE**

**Defined as :**

It is a circuit whose output is HIGH only when all its inputs are HIGH. In all other cases, output will be LOW.It has N inputs(N≥2) and one output.

AND operation is like ordinary multiplication of 1 and 0.

**Truth Table :**truth table for two input AND gate,

A(input) |
B(input) |
Y(output) |

0 | 0 | 0 |

0 | 1 | 0 |

1 | 0 | 0 |

1 | 1 | 1 |

**Boolean Expression :**Its logic equation is written as

**Y = A AND B (for two inputs)**

** Y = A AND B AND C……..AND N**

** Y = A .B.C………. .N (for N inputs)**

** ****Logic symbol :**

**Switching circuit diagram (for two input AND gate) :**Bulb will glow only when both the switches A and B will be closed i.e. both the input should be HIGH.

**Diode circuit diagram (for AND gate) :**AND gate can be realized by using diodes . The inputs are A and B may be either at 0 V (logic 0) or +5 V(logic 1) correspondingly. The output is represented by Y . In the diode circuit of AND gate, when both the inputs are at value, A=+5 V and B= +5 V,(i.e. at logic 1) then both the diodes are in OFF condition. As a result, no current flows through the resistor and there will not be any voltage drop across the resistor. Then, the output at Y will be +5 V. (i.e. logic 1)

Similarly, when both the inputs or either of the input (A or B ) is equal to 0 V(i.e. at logic 0) then both the diodes or corresponding diode is in ON state and act as short circuit. Then, the output Y becomes equal to 0 V (logic 0).

A |
B |
D1 |
D2 |
OUTPUT =Y |

0 | 0 | ON | ON | 0 |

0 | 1 | ON | OFF | 0 |

1 | 0 | OFF | ON | 0 |

1 | 1 | OFF | OFF | 1 |

**3) OR GATE**

**Defined as :**It is the circuit whose output is HIGH ,when any one of its input is HIGH. In other words, output is LOW, when all the inputs are LOW. It has N inputs(N≥2) and one output.

**Truth Table :**Truth table for two input OR gate,

A(input) |
B(input) |
Y(output) |

0 | 0 | 0 |

0 | 1 | 1 |

1 | 0 | 1 |

1 | 1 | 1 |

**Logic symbol :**

**Boolean Expression :**Its logic equation is written as,

**Y =A OR B =A+B (for two**

**inputs**

**)**

**Y=A OR B OR C…….OR N(for N inputs)**

**Y = A+B+C………. N (for N inputs)**

**Switching circuit diagram (for two input OR gate) :**Bulb will glow when any of the switch is closed (i.e. at logic 1).Bulb will not glow when all the switches are open(i.e. at logic 0)

**Diode circuit diagram (for OR gate) :**OR gates can be realized by using diodes . The inputs are A and B may be either at 0 V or +5 V correspondingly. The output is represented by Y . When both the inputs are at same value, A=0 V and B= 0 V, then both the diodes are in OFF condition. As a result, no current flows through the resistor and there will not be any voltage drop across the resistor. Then the output will be 0 V. Similarly, when both the inputs or either the inputs such as A and B are equal to +5 V, then the corresponding diodes either D1 or D2 or both the diodes are in ON state and act as short circuits. Then the output will be +5 V.

A |
B |
D1 |
D2 |
OUTPUT =Y |

0 | 0 | OFF | OFF | 0 |

0 | 1 | OFF | ON | 1 |

1 | 0 | ON | OFF | 1 |

1 | 1 | ON | ON | 1 |