Lecture-1 by Farhan
Lecture-1 by Farhan
Lecture-1 by Farhan
Logic Gates
Introduction :
Logical gates are important building blocks in
digital circuits. So study of logic gates is very
important.
There are three types of basic gates. AND,
OR and NOT gates. Other gates are NAND,
NOR, EX-OR, EX-NOR etc.
English mathematician George Boole
invented symbolic logic in 1854, which is
known as Boolean Algebra.
In this chapter we will learn different types of
Logic Gates.
Logic Gates :
Before we study Logic gates, let us first
understand what are logic levels?
There are two types of Logic levels : 0 and 1.
These show quite different situation as shown
in the following table.
L
A B
Voltage
~
Source
A B C Y
0 0 0 0
A 0 0 1 0
B Y
C 0 1 0 0
0 1 1 0
Three input AND gate
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1
Truth Table
2) OR Gate :
The OR gate is an electronic circuit that
gives a high output (1) if one or more of
its inputs are high.
A plus (+) sign is used to show the OR
operation.
2 input OR gate
A B A+B
A
A+B 0 0 0
B 0 1 1
1 0 1
1 1 1
Truth Table
2) OR Gate :
It means only one time output remain low
rest of time output remain high.
2n-1 times result is high where n is
number of input.
Suppose three input OR gate than 23- 1=7
times result is true (high).
OR gate can be easily explained with
following circuit diagram.
As shown in this circuit if switches A and B
both are open then lamp L not glows,
otherwise in other state lamp will glow.
2) OR Gate :
A L
Voltage
~
Source
A B C Y
0 0 0 0
A 0 0 1 1
B Y
C 0 1 0 1
0 1 1 1
Three input OR gate
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
Truth Table
3) NOT Gate :
The NOT gate is an electronic circuit that
produces an inverted version of the input at
its output.
It is also known as an inverter. If the input
variable is A, the inverted output is known as
NOT A. There is also shown as A’ or A with a
bar over the top as shown as the outputs.
NOT gate
A A’
A A’ 0 1
1 0
3) NOT Gate :
When input at logic 0, output is 1 and
when input at logic 1 then output is 0.
Universal Gates :
1) NAND Gate :
NAND gate means NOT-AND gate which is
equal to an AND gate followed by a NOT gate.
The output of all NAND gates are high if any
of inputs are low. The symbol is an AND gate
with a small circle on the output.
2 input NAND gate
A A B A.B
B AB 0 0 1
0 1 1
1 0 1
Truth Table 1 1 0
NAND Gate : (Three input NAND gate)
1) NAND Gate :
When all input are high, output remain LOW.
A B C Y
A 0 0 0 1
B y
0 0 1 1
C
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 0
Truth Table
Universal Gates :
2) NOR Gate :
NOR gate means NOT-OR gate which is equal
to an OR gate followed by a NOT gate.
The outputs of all NOR gates are low if any of
the inputs are high.
The symbol is an OR gate with a small circle
on the output. The small circle represent
inversion.
2 input NOR gate
A B A +B
A 0 0 1
y
B 0 1 0
1 0 0
Truth Table 1 1 0
NOR Gate : (Three input NOR gate)
2) NOR Gate :
Truth Table
A B C Y
A 0 0 0 1
B y
0 0 1 0
C
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 0
Exclusive Gates :
1) Ex-OR Gate :
The ‘Exclusive-OR’ gate is a circuit which
will give a high output if either, but not both,
of its two inputs are high.
An encircle plus sign + is used to show the
Ex-OR operation.
2 input Ex-OR gate
A B A+ B
A
0 0 0
B A+B 0 1 1
1 0 1
EOR
1 1 0
Truth Table
1) Ex-OR Gate :
A A
A.B
B
y
AB + AB
A.B
B
1) Ex-OR Gate : (Three input Ex-OR gate)
Truth Table
A B C Y
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1
1) Ex-OR Gate : (Three input Ex-OR gate)
A+B
A 1
B 2 y
C A+ B + C
A
B
A+B
EOR
Exclusive Gates :
2) Ex-NOR Gate :
A A
A.B
B
y/F
(A+B).(A+B)
B A.B
Ex-NOR
Exclusive Gates :
2) Ex-NOR Gate :
A B C Y
0 0 0 1
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 0
Truth Table
Exclusive Gates :
2) Ex-NOR Gate :
A+B
A 1
B 2 y
C
A+ B + C
Summary of Logic gates :
No Name Logic Diagram Truth Table
of
gate
2 OR 2 input OR gate
A
A+B A B A+B / F
B
0 0 0
0 1 1
1 0 1
1 1 1
Summary of Logic gates :
No Name Logic Diagram Truth Table
of
gate
3 NOT
NOT gate
A A’
A A’/A
0 1
1 0
Summary of Logic gates :
No Name Logic Diagram Truth Table
of
gate