All the Basic Logic Gates with Truth Table and diagram

In the Digital electronics the logic gates have significant roles. Most of the digital devices contain integrated circuits (ICs) in it which are made of the logic gates. In this article, we are going to discuss all the basic logic gates with truth table, circuit diagrams, Boolean expressions, operations and uses. This will be helpful for the students of Physics, Electronics and Computer Science.

Contents in this article:

  • What is Logic gate?
  • How the Logic gates work?
  • Basic Logic Gates with truth table
  • OR gate with truth table
  • AND gate with truth table
  • NOT gate with truth table
  • NAND gate with truth table
  • NOR gate with truth table
  • Uses of Logic gates

What is Logic Gate?

Logic gates are the physical electronic devices which can perform logical operations with one or more binary inputs and give a single binary digit at the output. The operation is basically switching operations. All the logic gates are made of resistor and diodes or transistors. Here we are dealing with classical logics gates. These logic gates obey Boolean algebra. There are some quantum logic gates which are very much different from these. Here these are not the parts of our discussion.

How the logic gates work?

Logic gates performs classical switching operations. If a logic gate have more than one inputs, it allows to pass the desired binary bit at the output of the logic gate. Even a logic gate can give the complement of input at the output. Sometimes it gives the complement of the sum or multiplication of the inputs at its output. The construction elements (Diode or Transistor) of logic gates is designed to be operated as switches. Check the Diode as a switch and Transistor as a switch.

Basic Logic gates with Truth Table and diagram

OR gate, AND gate, NOT gate, NAND gate and NOR gate are the basic classical logic gates. Here I am going to discuss the Boolean equation, logical diagram and operation of each of the logic gates.

OR gate with Truth Table

OR gate is a classical logic gate which give the output as the Boolean sum of the inputs of the gate. An OR gate can have infinite number of inputs and gives only one output. If A, B, C, D,….. be the inputs of the OR gate then the output of the OR gate will be

Y = A+B+C+D+…….. This is the Boolean expression defining the relation between the inputs and the output of the OR gate.

Circuit symbol for Two input OR gate

Two Input OR gate circuit symbol
Two Input OR gate symbol

Truth Table for two Input OR gate

Input (A)Input (B)Output, Y= A+B
000
011
101
111
Truth Table for Two input OR gate

Circuit diagram for three input OR gate

Three Input OR gate circuit symbol
Three Input OR gate symbol

Truth Table for three Input OR gate

Input (A)Input (B)Input (C)Output, Y= A+B+C
0000
0011
0101
0111
1001
1101
1011
1111
Truth Table of Three input OR gate

AND gate with Truth Table

AND gate is a classical logic gate which gives the output equal to the Boolean multiplication of the inputs. It also can have infinite number of binary inputs. If A, B, C, D,… be the inputs of AND gate then the Boolean expression for the output will be as following –

Y = ABCD….

The logical diagram and Truth table for two-input and three-input AND gate are as below –

Circuit diagram for two Input AND gate

Two input AND gate circuit symbol
Two input AND gate symbol

Truth Table for two Input AND gate

Input (A)Input (B)Output, Y=AB
000
010
100
111
Truth Table of two input AND gate

Circuit Diagram for Three Input AND gate

Three Input AND gate circuit symbol
Three Input AND gate symbol

Truth Table for three input AND gate

Input (A)Input (B)Input (C)Output, Y=ABC
0000
0010
0100
0110
1000
1010
1100
1111
Truth Table for three input AND gate

NOT logic gate with Truth Table

NOT gate is the classical logic gate which gives the output as the complement of its input. A NOT gate can have only one binary input. If we consider that the input of NOT gate is A, then the Boolean expression for the output will be \small \textbf{Y=} \overline{\textbf{A}}

One can see the logic diagram and Truth Table of NOT gate at below.

Circuit Symbol for NOT gate

NOT gate circuit symbol
NOT gate symbol

Truth Table for NOT gate

Input (A) Output \small \textbf{Y=} \overline{\textbf{A}}
01
10
Truth Table of NOT gate

NAND logic gate with Truth Table

NAND gate consists of a AND and a NOT gate in series. NAND gate is a classical logic gate which gives the output as the complement of the multiplication of the inputs. That means it gives the complement of the output of an AND gate. A NAND gate can have infinite number of inputs and only one output. If A, B, C, D,…. be the binary inputs of a NAND gate then the expression for the Boolean output will be \small \textbf{Y=} \overline{\textbf{ABCD…}}

Here are the logical diagrams and Truth Tables for a two input and three input NAND gates.

Circuit diagram for Two Input NAND gate

Two Input NAND gate circuit symbol
Two Input NAND gate circuit symbol

Truth Table for two Input NAND gate

Input (A)Input (B)Output \small \textbf{Y=} \overline{\textbf{AB}}
001
011
101
110
Truth Table for two input NAND gate

Circuit diagram for Three Input NAND gate

Three Input NAND gate Circuit symbol
Three Input NAND gate Circuit symbol

Truth Table for Three Input NAND gate

Input (A)Input (B)Input (C)Output \small \textbf{Y=} \overline{\textbf{ABC}}
0001
0011
0101
0111
1001
1011
1101
1110
Truth Table for three input NAND gate

NOR gate with Truth Table

A NOR gate consists of an OR gate and a NOT gate in series. NOR gate is a logic gate which give the output as the complement of the sum of the inputs. So the output of a NOR gate is the complement of the output of an OR gate with same inputs. If A, B, C, D….. etc. be the inputs of a NOR gate the expression for the Boolean output is \small \textbf{Y=} \overline{\textbf{A+B+C+D}}

See the logical diagram and the truth table in below –

Circuit symbol for Two Input NOR gate

Two Input NOR gate circuit symbol
Two Input NOR gate circuit symbol

Truth Table for Two Input NOR gate

Input (A)Input (B)Output \small \textbf{Y=} \overline{\textbf{A+B}}
001
010
100
110
Truth Table for the two input NOR gate

Circuit diagram for Three Input NOR gate

Three Input NOR gate circuit Symbol
Three Input NOR gate circuit Symbol

Truth Table for Three Input NOR gate

Input (A)Input (B)Input (C)Output \small \textbf{Y=} \overline{\textbf{A+B+C}}
0001
0010
0100
0110
1000
1010
1100
1110
Truth Table for Three input NOR gate

Use of Logic gates

  1. Logic gates have wide applications in logical binary operations.
  2. Logic gates can store data. Therefore logic circuits like Flipflops, Resisters, counters are used as memory in computers and PCs.
  3. Switching operation of Logic gates is very much popular. Logic gates used as switches in digital circuits.
  4. Logic gates are the main constitutions of integrated circuits (ICs).

These are the basic logic gates with truth table and diagram. If you have any doubt on this topic feel free to ask me in the comment section.

Thank you!

Related Posts:

  1. XOR gate using only NAND gate and only NOR gate

3 thoughts on “All the Basic Logic Gates with Truth Table and diagram”

Leave a Comment