Types of Basic Logic Gates
Types of Basic Logic Gates
Logic gates are an important concept if you are studying electronics. These are important digital
devices that are mainly based on the Boolean function. Logic gates are used to carry out logical
operations on single or multiple binary inputs and give one binary output. In simple terms, logic
gates are the electronic circuits in a digital system.
In this lesson, we will further look at the different types of basic logic gates with their truth table and
understand what each one is designed for.
• OR Gate
• AND Gate
• NOT Gate
• XOR Gate
Additionally, these gates can also be found in a combination of one or two. Therefore we get other
gates such as NAND Gate, NOR Gate, EXOR Gate, EXNOR Gate.
Also Read: Transistor
OR Gate
In OR gate the output of an OR gate attains the state 1 if one or more inputs attain the state 1.
A B Y
0 0 0
0 1 1
1 0 1
1 1 1
AND Gate
In AND gate the output of an AND gate attains the state 1 if and only if all the inputs are in state 1.
A B Y
0 0 0
0 1 0
1 0 0
1 1 1
NOT Gate
In NOT gate the output of a NOT gate attains the state 1 if and only if the input does not attain the
state 1.
The Boolean expression is Y = \bar{A}Aˉ, read as Y equals NOT A.
The truth table of NOT gate is as follows;
A Y
0 1
1 0
The three gates (OR, AND and NOT), when connected in various combinations, give us basic logic
gates such as NAND, NOR gates, which are the universal building blocks of digital circuits.
NAND Gate
This basic logic gate is the combination of AND and NOT gate.
A B Y
0 0 1
0 1 1
1 0 1
1 1 0
NOR Gate
This gate is the combination of OR and NOT gate.
A B Y
0 0 1
0 1 0
1 0 0
1 1 0
A B Y
0 0 0
0 1 1
1 0 1
1 1 0
A B Y
0 0 1
0 1 0
1 0 0
1 1 1
De Morgan’s Theorem
First theorem – It states that the NAND gate is equivalent to a bubbled OR gate.
Important Conversions
1) The ‘NAND’ gate: From ‘AND’ and ‘NOT’ gate.
Boolean expression and truth table :
Y=A⋅B¯¯¯¯¯¯¯¯¯¯¯
A B Y′=A⋅B Y
0 0 0 1
0 1 0 1
1 0 0 1
1 1 1 0
(2) The ‘NOR’ gate: From ‘OR’ and ‘NOT’ gate
Boolean expression and truth table :
Y=A+B
A B Y′=A+B Y
0 0 0 1
0 1 1 0
1 0 1 0
1 1 1 0
(3) The ‘XOR’ gate: From ‘NOT’, ‘AND’ and ‘OR’ gate.
The logic gate which gives high output (i.e., 1) if either input A or input B but not both are high (i.e. 1)
is called exclusive OR gate or the XOR gate. It may be noted that if both the inputs of the XOR gate
are high, then the output is low (i.e., 0).
Boolean expression and truth table: A.\bar{B}+\bar{A}.BA.Bˉ+Aˉ.B or
Y = A \bigoplus BY=A⨁B
A B Y
0 0 0
0 1 1
1 0 1
1 1 0
(4) The Exclusive nor (XNOR) gate XOR + NOT
Boolean expression: Y= \bar{(A\bigoplus B)}Y=(A⨁B)ˉ
A B Output
0 0 1
0 1 0
1 0 0
1 1 1