Nothing Special   »   [go: up one dir, main page]

Lecture-1 by Farhan

Download as pdf or txt
Download as pdf or txt
You are on page 1of 35

Lecture – 1

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.

Sr.No Device Logic 0 Logic 1


1 Switch Off On
2 Door Closed Open
3 Lamp Off On
4 Level Low High
Logic Gates :
Gates is an electronic ckt with one or more
inputs but only one output. Logic gates
process signals which represent true or
false.
Logic gates are blocks of hardware that
produce a logical 1 of logical 0 output signal
depending on input signal to logic gate.
They are also known as logic circuit
because with the proper input they
establish logical manipulation path.
Logic Gates :
 They also categorized as below :

(1) Basic gates - (AND, OR, NOT)


(2) Universal gates - (NAND, NOR)
(3) Exclusive gates- (EX-OR, EX-NOR)
 Basic Gates :
1) AND Gate :
 The AND gate is an electronic circuit that
gives a high output (1) only if all its inputs
are high.
 A dot (.) is used to show the AND operation
i.e. A.B.
2 input AND gate
A B A.B
A 0 0 0
B AB 0 1 0
1 0 0
1 1 1
Truth Table
1) AND Gate :
It means only one time output remain high
rest of time output remain low.
2n-1 times output is low where n is
number of input.
Suppose three input AND gate than 23-1=7
times result is false (low).
AND gate can be easily explained with
following circuit diagram. As shown the circuit
if switches A and B both are closed then lamp
L glows. If any one switch is open or both the
switch are open then lamp L will not glow.
1) AND Gate Example :

L
A B

Voltage
~
Source

Boolean expression is Y=A.B


1) AND Gate : (Three input AND gate)

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

Boolean expression is Y=A+B


2) OR Gate : (Three input OR gate)

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

Three input Ex-OR gate


 Exclusive Gates :
2) Ex-NOR Gate :
 The ‘Exclusive-NOR’ gate circuit does the
opposite to the Ex-OR gate.
 It will give low output if either, but not both
of its two inputs are high.
 The symbol is an EX-NOR gate with a small
circle on the output. The small circle
represent inversion.

A
B
A+B
EOR
 Exclusive Gates :
2) Ex-NOR Gate :

2 input Ex-NOR gate


A B A +B
0 0 1
0 1 0
1 0 0
1 1 1
Truth Table
1) 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

1 AND 2 input AND gate


A
AB A B A.B / F
B
0 0 0
0 1 0
1 0 0
1 1 1
 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

4 NAND 2 input NAND


A gate
AB A B A.B
B
0 0 1
0 1 1
1 0 1
1 1 0
 Summary of Logic gates :
No Name Logic Diagram Truth Table
of
gate

5 NOR 2 input NOR


2 input NOR gate
A gate
y
B A B A+B
0 0 1
0 1 0
1 0 0
1 1 0
 Summary of Logic gates :
No Name Logic Diagram Truth Table
of
gate
6 EX 2 input Ex OR
-
A A B A +B
OR
B A +B 0 0 0
0 1 1
1 0 1
1 1 0
 Summary of Logic gates :
No Name Logic Diagram Truth Table
of
gate
7 EX 2 input Ex NOR
- A
B A B A +B
NOR A+B
0 0 1
0 1 0
1 0 0
1 1 1

You might also like