0% found this document useful (0 votes)
51 views40 pages

5 - Logic Gates

The document discusses the seven basic logic gates - AND, OR, NOT, NAND, NOR, XOR and XNOR. It explains the function, truth table and timing diagram of each gate and provides examples of their applications.

Uploaded by

Play Store
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views40 pages

5 - Logic Gates

The document discusses the seven basic logic gates - AND, OR, NOT, NAND, NOR, XOR and XNOR. It explains the function, truth table and timing diagram of each gate and provides examples of their applications.

Uploaded by

Play Store
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 40

Faculty Of Engineering and Technology

Department of Computer Science


Course: Digital Logic and Design-I
Course Code : CS-105 (4)
(Lecture-4)

Instructor: Wali Ullah Shinwari


Department of Computer Science
Email: [email protected]
Mobile: +93(0) 704545238
CONTENTS

Logic Gates

Basic Building Blocks

Logic Gate Symbols

Unique function

Truth or Function Table

Function Expression

Timing Diagram

2
OUTCOMES

At the end of this lecture, students will know;

• Concept of Logic Gates.

• Importance and the usage of five Logic Gates.

3
Digital Logic

 Digital logic is the foundation not only for computing but also for many other
electronic devices and control system found in the almost every part of
modern life.
 Digital electronics depends on just seven types of Logic Gate, connected
together with a minimum of additional components.
 Combinations of Logic Gates then form circuits that can perform specific
tasks within the system.
Logic Gate

 There are many ways that a number of Logic gates can be combined to
perform a specific task.
 They may all work, but some combination will perform task better than others.

 The main study of all these are to find the ways by which a logic circuit design
will minimize , made it more efficient and cheaper.
Logic Gates
Seven Basic Logic Gates:
 Digital electronics relies on the actions of just seven types of Logic gates:
• AND
• OR
• NAND(Not AND)
• NOR
• XOR
• XNOR
• NOT
Logical AND Gate

 In digital electronic there are several logical gates which work or operate on
different logical operations, say logical addition, logical multiplication.
 AND Gate is a logical gate which is widely used having two or more inputs
and a single output.
 This gate works or operates on logical multiplication rules.
 An AND gate may have any number of inputs but only one output.
AND Gate

• 1 output
• 2 inputs
• 3 inputs
• 4 inputs
• Multiple inputs
AND Gate Function
 A truth table is important component of designing the computer
circuit design, because it shows how a Circuit is working.
 Logical Multiplication function:
AND Gate Timing Diagram
 To check the output of a Gate at specific time of different inputs:
AND Gate Function
 Enable/Disable Device
 Counter counts when it receives pulses:

Clock Pulses U/D


Counter

B1

A
Reset B8

Carry out

B ENB

Disable
Enable
OR Gate

 The OR Gate performs Boolean add Function.


 An OR Gate has multiple inputs and a single output.
• 1 output
• 2 inputs
• 3 inputs
• 4 inputs
• Multiple inputs
OR Gate Function
 A truth table is important component of designing the computer
circuit design, because it shows how a Circuit is working.
 Boolean Add function:
OR Gate Timing Diagram
 To check the output of a Gate at specific time of different inputs:
OR Gate Application
 Car door open alarm :

Front left door


Rear left door
Alarm
Front right door
Rear right door
NOT Gate

 NOT Gate is also known as an Inverter.


 NOT gate is a logical gate which only inverts the input digital signal.
 A NOT gate will always have high or logical 1 output when its input is low or
0.
 The Logical symbols of a NOT gate is shown below.
• 1 output
• 2 inputs
NOT Gate Function

 NOT gate is used in circuits to generate the 1’s Complement of a number by


inverting all its bits.
 Invert function:
NOT Gate Timing Diagram
 To check the output of a Gate at specific time of different inputs:

t0 t1 t2 t3 t4 t5 t6

F
NOT Gate Application
 1’s Complement:

1 1 0 0 1 0 1 0

0 0 1 1 0 1 0 1
Alternative Representation:
NAND Gate

 The NAND Gate performs a function that is equivalent to the function


performed by the combination of an AND gate and a NOT gate.
 The NAND gate has an output that is normally at logic level “1” and goes
“LOW” to logic level “0” when all of its inputs are at level “1”.
 The NAND logic Gate is the inverse of AND Gate.
 NAND Gate is also universal Gate because it can be used to generate any other
type of logic gate function.
NAND Gate

 The NAND Gate performs a function that is equivalent to the function


performed by the combination of an AND gate and a NOT gate.
• 1 output
• 2 inputs
• 3 inputs
• 4 inputs
• Multiple inputs
NOT AND (NAND) Gate
NAND Gate Function
 NOT-AND function:
NAND Gate Timing Diagram
 To check the output of a Gate at specific time of different inputs:
NAND Universal Gate

1 2
NAND Gate Application
 Device Failure Alarm:
 Toxic fumes produced by the chemicals are removed from the ware house
and dispersed in the atmosphere through three exhaust fans.
 When all fans are working the input to the NAND gate is 111 and the output
is 0.
 When any one fan fails the output of NAND gate becomes 1 sounding an
alarm connected tot the output of the NAND gate.

ALARM
NOR Gate

 It is the inverse of OR Gate.


 It has multiple inputs and single output.
 The output of NOR Gate will 1 , when all of the inputs are “0s” .
 It is also a universal Gate because it can also be used in place of other Gates in
the logic circuit.
NOR Gate

• 1 output
• 2 inputs
• 3 inputs
• 4 inputs
• Multiple inputs
NOR Gate:
NOR Gate Function
 NOT-OR function:
NOR Gate Timing Diagram
 To check the output of a Gate at specific time of different inputs:
Application of NOR Gate:
XOR Gate( 1’s are odd then 1)
An XOR gate (Exclusive OR gate) is a digital logic gate that performs an exclusive OR operation
on two or more binary inputs.
XOR Gate Truth Table:
Input A Input B Output
0 0 0
0 1 1
1 0 1
1 1 0
XOR gate is a fundamental logic gate that produces an output of 1 when the number of high
inputs 1 is odd, and it produces an output of 0 when the number of high inputs is even.
XOR is a crucial component in digital logic circuits and has various applications in electronics
and computer systems.

34
Three-Input XOR Gate (odds 1’s gave 1)
Three-Input XOR Gate Truth Table:
In a three-input XOR gate, the output is high (1) when the number of high inputs (1) is odd. In other words, the
output is 1 if the number of 1s in the inputs is an odd number; otherwise, the output is 0.
Input A Input B Input C Output
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

35
XOR Symbol

36
XNOR Gate (same inputs then 1)
How XNOR Gate Output Is Determined:
The XNOR gate performs an exclusive NOR operation, which means its output is high (1) when even numbers of
inputs are at a high level.

XNOR Gate Truth Table:

Input A Input B Output


0 0 1
0 1 0
1 0 0
1 1 1

37
Three-Input XNOR Gate Truth Table
In a three-input XNOR gate, the output is high (1) when even numbers of inputs are at a high level.
OUTPUT = A⊙B⊙C

Input A Input B Input C Output


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

38
XNOR Symbol

39
Thank You…!

You might also like