The fundamental building blocks of digital systems is known as the **logic gates**. **Logic gates** are sometimes known as electronic circuits because they are made up of a number of electronic devices and components. They have the capability to make decisions, in the sense that it produces one output when some combinations of input are present, and we get a different output when other combinations of input are present or performed.

There are three basic types of **logic gates**

- AND
- OR
- NOT

Inputs and outputs can occur only in two levels of **logic gates**. The two levels are one is HIGH and the other is LOW, or TRUE and FALSE, or ON and OFF, or simply **1 and 0**.

The** truth table** is a table or chart that is combination of all the possibilities of input variables and the corresponding outputs. It shows how the logic circuits output responds to various combinations of logic levels at the inputs.

## AND Logic Gate

AND gate has two or more inputs but only one output.The output logic states 1 only when all the input logic states are 1 and for output logic states 0 only when one of the input logic state is 0.

**AND Gate Logic Symbol **

**AND Gate Truth Table**

Input A | Input B | Output X |

0 | 0 | 0 |

0 | 1 | 0 |

1 | 0 | 0 |

1 | 1 | 1 |

AND gate can also be realized by using diode circuit .

Inputs are A and B gates may be either 0 volt or 5 volts. When A = +5V and B = +5V both the diodes D1 and D2 are OFF. So no current will flow through R and therefore no voltage drop occurs across R.

When A = 0V or B = 0V both the diodes D1 and D2 are ON or both are ON acts as short circuits and therefore the output X = 0 V.

## OR Gate

OR gate may have two or more inputs but only one output. The output assumes logic 1 state even if one of its inputs is in the logic 1 state. Its output assumes logic 0 states, only when each one of its input is 1. OR gate is also called an any or all gate. It can be called an inclusive OR gate because it includes the condition both the input can be present.

**OR Gate Logic Symbol**

**OR Gate Truth Table**

Input A | Input B | Output X |

0 | 0 | 0 |

0 | 1 | 1 |

1 | 0 | 1 |

1 | 1 | 1 |

Symbol for OR gate operation is “+”.

OR gate can also be realized by using diode circuit.

Inputs are A and B gates may be either 0 volt or 5 volts.

When A =0V and B= 0V, both the diodes D1 and D2 are OFF. No current flow through R and so no voltage drop occurs across R. Hence the output voltage X= 0V. When either A= +5V or B= +5V or when both A and B are equal to +5V, the corresponding diode D1 or D2 is ON or both D1 and D2 are ON and acts as the short circuit and therefore output X=5V.

## NOT Gate

NOT gate is also called an inverter has only one input and one output. It is a device whose output is always the compliment of its input. The output logic 1 states when its input is in logic 0 state and assumes the logic 0 state when its input is in logic 1 state.

**NOT Gate Logic Symbol**

**NOT Gate Truth Table**

Input A | Output X |

0 | 1 |

1 | 0 |

NOT gate can also be realized by using Transistor circuit.

When A=0V transistor T is reversed biased and therefore remaining OFF. As no current flow through R no voltage drop across R. Hence the output voltage X= +5V. When the input A =+5V, T is ON and the output voltage X= 0V or voltage saturated.

## Universal Gate

There are two universal gate

- NAND Gate
- NOR Gate

**NAND Gate**

NAND gate is the combination of AND gate and NOT gate. The expression of NAND gate can be written as X=\overline { AB } …..and is read as ”X” is equal to A.B.

**NAND Gate Logic Symbol**

**NAND Gate Truth Table**

Input A | Input B | Output X |

0 | 0 | 1 |

0 | 1 | 1 |

1 | 0 | 1 |

1 | 1 | 0 |

The output is logic o level only when each of the input assumes a logic 1 level.

NANAD gate can also be realized by using diode circuit.

Truth Table

Input A | Input B | Output X |

0V | 0V | 5V |

0V | 5V | 5V |

5V | 0V | 5V |

5V | 5 | 0V |

**NOR Gate **

NOR gate is the combination of the NOT gate and OR gate. The expression of the NOR gate can be expressed as “X” =\overline { A+B }

**NOR Gate Logic Symbol**

**NOR Gate Truth Table**

Input A | Input B | Output X |

0 | 0 | 1 |

0 | 1 | 0 |

1 | 0 | 0 |

1 | 1 | 0 |