Logic gates are the basic building blocks of digital electronics that follow different logical operations. These gates have significant roles in the construction of logical circuits for different computations. Digital electronic devices contain integrated circuits (ICs) which are made of logical gates. In this article, we’re going to explore basic logic gates with truth tables, circuit diagrams, Boolean expressions, operations and uses. This will be helpful for the students of Physics, Electronics and Computer Science.
There are seven logic gates for digital computers. OR gate, AND gate and NOT gate are the three basic logic gates among those. Only these three gates are discussed here. NAND gate, NOR gate, XOR gate and XNOR gate are discussed in other articles.
Contents in this article:
- What are Logic gates?
- How do 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
- Uses of Logic gates
What are Logic Gates?
Logic gates are physical electronic devices that 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 resistors and diodes or transistors. Here we are dealing with classical logic gates. These logic gates obey Boolean algebra. There are some quantum logic gates that are very much different from these. Here these are not the parts of our discussion.
How do the logic gates work?
Logic gates perform classical switching operations. If a logic gate has more than one input, it allows passing 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 are designed to be operated as switches. Check the Diode as a switch and Transistor as a switch.
Basic Logic gates with Truth Tables and diagrams
OR gate, AND gate, NOT gate are the three basic classical logic gates. OR and AND gates follow multi-input logic whereas the NOT gate performs single-input logic. Here, I’m going to discuss the Boolean equation, logical diagram and operation of each of these logic gates.
OR gate with Truth Table
OR gate is a classical logical gate that gives the output as the Boolean sum of the inputs of the gate. An OR gate can have an 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
The following figure is the circuit symbol of OR gate with two inputs A and B.
Truth Table for two Input OR gate
Here is the OR gate truth table with two inputs A and B. The output is taken at Y.
Input (A) | Input (B) | Output, Y= A+B |
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
Circuit diagram for three input OR gate
This is the circuit symbol of OR gate with three inputs A, B and C.
Truth Table for three Input OR gate
Here is the truth table of OR gate with 3 inputs A, B and C.
Input (A) | Input (B) | Input (C) | Output, Y= A+B+C |
0 | 0 | 0 | 0 |
0 | 0 | 1 | 1 |
0 | 1 | 0 | 1 |
0 | 1 | 1 | 1 |
1 | 0 | 0 | 1 |
1 | 1 | 0 | 1 |
1 | 0 | 1 | 1 |
1 | 1 | 1 | 1 |
AND gate with Truth Table
AND logic gate is a classical logic gate that gives the output equal to the Boolean multiplication of the inputs. It also can have an 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 follows –
Y = ABCD….
The logical diagram and Truth table for two-input and three-input AND gate are as below –
Circuit diagram for two Inputs AND logic gate
The following figure gives the circuit symbol of AND gate with two inputs A and B.
Truth Table for two-input AND gate
Here is the truth table of AND gate with 2 inputs A and B.
Input (A) | Input (B) | Output, Y=AB |
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
Circuit diagram for three-input AND gate
This is the circuit symbol of AND gate with three inputs A, B and C.
Truth Table for three input AND gate
Here is the truth table of AND gate with 3 inputs A, B and C.
Input (A) | Input (B) | Input (C) | Output, Y=ABC |
0 | 0 | 0 | 0 |
0 | 0 | 1 | 0 |
0 | 1 | 0 | 0 |
0 | 1 | 1 | 0 |
1 | 0 | 0 | 0 |
1 | 0 | 1 | 0 |
1 | 1 | 0 | 0 |
1 | 1 | 1 | 1 |
NOT logic gate with Truth Table
NOT gate is the classical logic gate that gives the output as the complement of its input. A NOT gate can have only one binary input and it gives the output as the inverter of the 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}}.
The logic diagram and Truth Table of the NOT gate are given below.
Circuit Symbol for NOT gate
NOT gate has a very simple circuit symbol as shown below. There can be only one input and only one output. The input is A and the output is Y.
Truth Table for NOT gate
Input (A) | Output \small \textbf{Y=} \overline{\textbf{A}} |
0 | 1 |
1 | 0 |
Use of Logic gates
- Logic gates have wide applications in logical binary operations.
- Logic gates can store data. Therefore logic circuits like Flipflops, Resisters, counters are used as memory in computers and PCs.
- Switching operation of Logic gates is very much popular. Logic gates are used as switches in digital circuits.
- Logic gates are the main constitutions of integrated circuits (ICs).
These are three basic logic gates with truth tables and circuit diagrams. If you have any doubts on this topic feel free to ask me in the comment section.
Thank you!
Related Posts:
- Basic logic gates using NAND gate only
- XOR gate using only NAND gate and only NOR gate
- NAND gate with 3 inputs
- NOR gate
- XNOR gate using NAND and NOR gate only
9 thoughts on “Basic logic gates with truth tables and diagrams”
Comments are closed.