**Logic Gates** are the devices used as the basic building blocks of all the digital circuits which we are using around the world.

We have to use different rules, laws, and theorems to analyze any digital circuits.

S0 by connecting these basic building blocks which we called as **Logic Gates**, we can build any circuits that can perform the arithmetic or any other functions associated with the human brain.

A Logic Gate is an electronic circuit that has one or more than one inputs and only one output.

The relation between the input and output purely depends on the certain logic that humans want to make, so that their task can be done easily with that logic circuit.

Because they simulate mental processes, **Logic Gates** are often called Logic circuits.

There are different types of **Logic Gates** which we are going to learn in this lecture today.

But before starting the lecture let me define the classification of the **Logic Gates.**

**Classification of Logic Gates :**

As defined in the following, The logic gates are classified into three categories, namely

- The Basic Gates
- The Universal Gates
- The Special Purpose Gates

**Positive And Negative Logic:**

The Digital circuits will have only two distinct output voltage levels.

These two voltage levels will be used to represent the logic 0 and logic 1 outputs of the logic circuits.

The high and low voltage levels of the output voltage can be assigned to represent logic 0 and logic 1 levels by using two different types of logic:

- Positive Logic
- Negative logic

**Positive Logic:**

A “LOW” voltage level represents the “Logic 0” state and a comparatively “HIGH” output voltage level represents the “Logic 1” state.

For example, 0 volts represent logic 0 and +5 V represents logic 1. This is called as **Positive Logic**.

**Negative Logic:**

A “LOW” voltage level represents the “Logic 1” state and a comparatively “HIGH” output voltage level represents the “Logic 0” state.

For example, 0 volts represent logic 1 and +5 V represents logic 0. This is called as **Negative Logic**.

Note: In this Lecture we are going to consider only the positive logic. Also we will assume that logic 0 will represent 0V and logic 1 will represent +5 V.

So, Now we are going to discuss about:

- Logic Gates
- Symbol of Logic Gates
- Truth Table of Logic Gates
- Timing Diagram
- Standard Packages of Logic gates with pin configuration.

**Basic Gates:**

**NOT Gate or Inverter Gate: **

The **NOT gate** or **Inverter Gate** is a logic gate having one input (A) and one output (Y). Its symbol , Truth table are as per below:

**Important Points about NOT gate:**

- The NOT gate is also known as an “Inverter” because its output is the inverted version or “Complement” of its input. This is shown in the truth table of NOT gate.
- The bubble in the symbol represents the inversion of signal.

**Timing Diagram of NOT Gate:**

The Input to a gate may not be a DC voltage. In certain applications it can be a train or rectangular pulses with the high and low levels in the prescribed limits.

Below figure shows the timing diagram for the pulsed operation of NOT gate.

In the pulsed operation , pulses of finite duration are applied at the gate input. These waveforms shows that for a “0” input, the gate produces a “1” output. Thus the inversion is observed.

**Standard package of NOT Gate:**

- The NOT gate is available in the Monolithic integrated circuit form.
- IC 7404 is a 14 pin TTL Integrated circuit with six inverted inside.
- It is therefore called as ” hex inverter”.
- Note that all the NOT gate s in IC 7404 are completely independent of each other.
- You can download the datasheet of IC 7404 to know more about the it. IC7404 Datasheet

The pin configuration of IC 7404 is shown below figure:

**AND Gate**:

AND is one of the logic operators. It performs the logical multiplication on its inputs.

The output is high (Y=1) if and only if all the inputs to the gate are high (1).

The output is low (0), if atleast one of the input is low (0).

AND gate can have two or more inputs and only one output.

**Logical Symbol and Truth Table of AND Gate:**

The logical symbol of two input AND gate is shown n figure below. A and B are the inputs while Y is the output.

The truth table of two input AND gate is also shown in the figure. Note that the output is HIGH only when both the inputs are HIGH.

**Boolean Expressions of AND Gate:**

The expression relating the inputs and output of a logic gate is called as the **Boolean Expression. **

The Boolean Expression of AND gate is,

**Y= A . B**

where “dot” between A and B represents multiplication.

By substituting different values of A and B into the Boolean expression we can get the corresponding state of output. This is how we can verify the truth table of the gate.

**Multiple Input AND gate:**

The symbol and truth table foe 3-input and 4-input AND gate is shown in the figure below.

**Boolean Expression for 3-input and 4-input AND gate:**

The Boolean expression for a 3-input AND gate is:

**Y = A . B . C**

The Boolean expression for a 4-input AND gate is:

**Y = A . B . C . D**

**Timing Diagram of AND Gate: **

The operating principle of an AND gate remains same even for the pulsed inputs. This is evident from the figure shown below.

The input and output waveform for the pulsed operation are also shown in the figure.

**Standard Package of AND Gate:**

The AND gate is available in the monolithic integrated circuit form.

IC7408 is a 14 pin TTL integrated circuit with four AND gates inside. It is therefor called as Quad AND gate IC.

The pin configuration of IC 7408 is shown above figure. Pin 14 is connected to +5v supply and pin number 7 is connected to the ground.

The four AND gates inside IC 7408 are completely independent of each other.

**OR Gate**

An “OR” gate performs the logical addition on its inputs therefore its output will be high (1) if any one or both the inputs are high (1).

Its output will be low (0) if and only if both the inputs are simultaneously low (0).

**Logical Symbol and Truth Table OR Gate:**

Below figure shows the logical symbol and the truth table for two input OR gate.

Note that the output Y is LOW (0) if and only if both the inputs are LOW (0).

if any one or both the inputs are HIGH (1), then the output is HIGH (1).

**Boolean Expressions of OR Gate:**

The Boolean expression for a two input OR gate is:

**Y = A + B**

By substituting different values of A and B into this expression we can get the corresponding output. This is how we can verify the truth table of a gate.

**Multiple Input OR gate:**

Below figure shows the logical symbol and the truth table for 3-input and 4-input OR gates.

**Boolean Expression for 3-input and 4-input OR gate:**

The Boolean expression for a 3-input OR gate is:

**Y = A + B + C**

The Boolean expression for a 4-input OR gate is:

**Y = A +**** B + C + D**

**Timing Diagram of OR Gate:**

The Input and output voltage waveform for the pulsed operation of a two OR gate are as shown in the figure below. From the waveform, we conclude that OR gate will obey its truth table for pulsed operation as well.

**Standard Package of OR Gate:**

The OR gate is available in the monolithic integrated circuit form. IC 7432 is a 14 pin TTL integrated circuit with four , two input OR gates inside.

The pin configuration of IC 7432 is shown below in the figure.

**The Special Purpose Gates:**

- EX-OR and EX-NOR gates are the special types of gates. They can be used for applications such as half adder, full adder and Substractor.
- These gates are also called as derived gates.

**The EX-OR Gate**

The Exclusive-OR gate is abbreviated as EX-OR gate or sometimes as X-OR gate.

An EX-OR gate can have two or more than two inputs terminal and one output terminal.

**Logical Symbol and Truth Table EX-OR Gate:**

The logical symbol and truth table of EX-OR gate is as shown in the figure below which shoes that, when both the inputs are identical (A=B), the output is LOW (0) i.e. Y=0 for A=B=0 or A=B=1, and the output is HIGH (1) when A≠B.

**Boolean Expressions of EX-OR Gate:**

The Boolean expression for a two input EX-OR gate is:

**Y = A ⊕ B **

**Multiple Input EX-OR gate:**

EX-OR gates having more than two inputs and output area available in market.

Symbol of such EX-OR gates and truth table of 3-input and 4-input EX-OR gates are as shown in the figure below.

This truth table shows that output of EX-OR gate is HIGH (1) if odd number of inputs are HIGH (1).

**Boolean Expression for 3-input and 4-input EX-OR gate:**

The Boolean expression for a 3-input EX-OR gate is:

**Y = A ⊕ B ⊕ C**

The Boolean expression for a 4-input EX-OR gate is:

**Y = A ⊕**** B ⊕ C ⊕ D**

**Timing Diagram of EX-OR Gate:**

Note that during the intervals, I,II and IV, the input voltages are identical i.e. A = B, therefore the output Y = 0 whereas during the interval III and IV, the input voltages are not identical i.e. A ≠ B, therefore the output voltage Y= 1.

This shows that the EX-OR gate obeys the truth table even for the pulsed operation.

**Standard Package of EX-OR Gate:**

IC 7486 is the standard packaging of EX-OR gate. It consist of four two input EX-OR gates.

The pin configuration of IC 7486 is as shown in the figure below:

**Application of EX-OR gate:**

- Some of the applications of an EX-OR gates as as follows:
- As a magnitude Comparator.
- In the binary to gray code converter.
- used in adder and subtractor circuits.
- In the parity generator.
- as a modulo-2 adder.

**The EX-NOR Gate**

The word EX-NOR is a short form of exclusive-NOR means OT exclusive OR, so EX-NOR gate is equivalent to an EX-OR gate followed by a NOT gate as shown in the figure below.

**Logical Symbol and Truth Table EX-NOR Gate:**

The symbol for a two input EX-NOR gate is shown in the figure and its truth table is also shown.

The figure shows that the input of an EX-NOR gate is HIGH (1) if both the inputs are identical (A = B) and the output is LOW (0) if the inputs are not identical (A ≠ B).

**Boolean Expressions of EX-NOR Gate:**

The Boolean expression for a two input EX-NOR gate is:

**Y = (A ⊕ B)’**

**Multiple Input EX-NOR gate:**

The EX-NOR gate with more than two inputs are also available. the symbol of a three input and four input EX-NOR gate is shown in the figure below.

Looking at the truth table we conclude that the output of an EX-NOR gate is HIGH (1) when even number of inputs are HIGH (1) or when all inputs are zeros.

**Boolean Expression for 3-input and 4-input EX-NOR gate:**

The Boolean expression for a 3-input EX-NOR gate is:

**Y = (A ⊕ B ⊕ C)’**

The Boolean expression for a 4-input EX-NOR gate is:

**Y = (A ⊕**** B ⊕ C ⊕ D)’**

**Timing Diagram of EX-NOR Gate:**

The timing diagram of two input EX-NOR gate are as shown in the figure below.

**Standard Package of EX-NOR Gate:**

The EX-NOR gate is available in the IC form in the market. The TTL IC 74266 contains four, two input EX-NOR gates.

It is a 14 pin quad-two input EX-NOR gate IC in dial in line package. The pin configuration for the same is shown in the figure below.

**Application of EX-NOR gate:**

- As even parity generator
- As a comparator
- used also as even parity checker

**Universal Gates:**

The NAND and NOR gates are called as “Universal gates” because it is possible to implement any Boolean expression with the help of only NAND or only NOR gates.

Hence a user can build any combinational circuit with the help of only NAND gates or only NOR gates.

This is a great advantage because a user will have to make a stock of only NAND or NOR gate ICs.

**The NAND Gate**

The term NAND can be split as NOT-AND which means that the NAND operation can be implemented with the combination of an AND gate and a NOT gate i.e. Inverter.

Thus a NAND gate is equivalent to an AND gate followed by an inverter as shown in the figure below.

A NAND gate is called as “Universal gate” because we can construct AND, OR and NOT gates using only NAND gates.

**Logical Symbol and Truth Table of NAND Gate:**

The symbol of a two input NAND gate is shown in the figure below where a bubble (0) on the output side represents inversion.

The truth table of a two input NAND gate is also shown on the figure which shows that the output is low (0) if and only if both the inputs are high (1) simultaneously . For all other input combinations the output voltage will be high (1).

**Boolean Expressions of NAND Gate:**

The Boolean expression for a two input NAND gate is:

**Y = (A . B)’**

Here A . B represents an AND gate while the bar represents as inversion.

By substituting various combination of the inputs, it is possible to obtain the state of output. This is how we can verify the truth table.

**Multiple Input NAND gate:**

Below figure shows the circuit symbol of 3-input and 4-input NAND gates.

Figure also shows the truth table for a 3-input NAND gate which shows that the output is LOW(0) if all the inputs are HIGH(1), whereas the output is HIGH (1) if at least one input is low.

**Boolean Expression for 3-input and 4-input NAND gate:**

The Boolean expression for a 3-input NAND gate is:

**Y = (A . B . C)’**

The Boolean expression for a 4-input NAND gate is:

**Y = (A .**** B . C . D)’**

**Timing Diagram and Standard package of NAND Gate:**

The input and output voltage waveform for the pulsed operation of two input NAND gate are as shown in the figure below.

The NAND gate is available in the monolithic IC form. IC 7400 is a 14 pin TTL integrates circuit four, two input NAND gates inside.

The pin configuration of IC 7400 is also as shown in the figure.

**The NOR Gate**

This is another Universal gate.

The word NOR can be split as NOT-OR which means that NOR operation can be implemented with the combination of an OR gate and NOT gate i.e. Inverter.

Thus NOR gate is equivalent to a NOR gate followed by an inverter as shown in the figure.

The NOR gate like NAND gate is called as universal gate because it is possible to construct all the basic gate such as AND,OR and NOT gates using the NOR gates only.

**Logical Symbol and Truth Table of NOR Gate:**

The symbol of a two input NOR gate is shown in the figure below, where a bubble on the output side represents inversion.

The truth table of a two input NOR gate is shown in the figure which shows that the output of a NOR gate is HIGH(1) if and only if all its input are LOW(0) simultaneously.

The output of NOR gate is LOW (0) if any one or all the inputs are HIGH (1)

**Boolean Expressions of NOR Gate:**

The Boolean expression for a two input NOR gate is:

**Y = (A + B)’**

Here A + B represents an OR gate while the bar represents as inversion or complement.

By substituting various combination of the inputs A and B into the Boolean expression, we get the corresponding output. This is how we obtain the truth table of the NOR gate.

**Multiple Input NOR gate:**

Below figure shows the logical symbols of 3-input and 4-input NOR gates, and their Boolean expression.

Also shows the truth table of a 3-input NOR gate, which shows that its output is HIGH(1) if all the inputs are LOW(0) whereas its output is LOW(0) if atleast one input is HIGH(1).

**Boolean Expression for 3-input and 4-input NOR gate:**

The Boolean expression for a 3-input NOR gate is:

**Y = (A + B + C)’**

The Boolean expression for a 4-input NOR gate is:

**Y = (A +**** B + C + D)’**

**Timing Diagram and Standard package of NOR Gate:**

The timing diagram for the pulsed operation of a two-input NOR gate is as shown in the figure below.

It shows that the output of a NOR gate for the pulsed operation is HIGH(1) if and only if both its inputs are at LOW(0) simultaneously.

The NOR gate is available in the monolithic integrated circuit form.

IC 7402 is a 14 pin TTL IC that consists of 4, two-input NOR gates.

The pin configuration of IC 7402 is also shown in the below figure.

**Conclusion:**

So, In this lecture we got the complete knowledge of the

- Logic gates
- Their truth table
- Logical symbols
- Boolean expression
- Timing diagram and
- IC packages with pin configuration

after study this lecture, you don’t need to go anywhere to learn more about logic gates, as we have covered almost all the important topics related to Logic gates.

Still, if you need to study more about the logic gate then you can purchase any one of the reference books which we have mentioned on the below link.

Buy any one book from the link to know more about the logic gates.

If you have any doubt or any query regarding this topic then you can comment your query in the below comment box or you can also fill the form available in the contact us section.

Very well written.

The article provides complete knowledge about the logic gate, truth table, and timing diagram. Logic gates are divided into the basic gate, universal gate, and special purpose gate. Basic gates are NOT gate, AND gate, and OR gate,Special purpose gates are EX-OR gate, and X-NOR gate. Universal gates are NAND gate and NOR gate because using this gate you can build any combinational circuit.