SlideShare a Scribd company logo
1 of 22
Unit 2
Logic Gates and Functions
Unit 2: Logic Gates and Functions
Overview
• Introduction to Digital Logic Gates
• Truth table
• Symbol
• Universal Gates (NAND/NOR)
• XOR and XNOR Gates
• Logic Chips
• Logic Functions
• Logical Equivalence
• Standard Forms (SOP/POS)
Introduction to Digital Logic Basics
 Hardware consists of a few simple building blocks
 These are called logic gates
 AND, OR, NOT, …
 NAND, NOR, XOR, …
 Logic gates are built using transistors
 NOT gate can be implemented by a single transistor
 AND gate requires 3 transistors
 Transistors are the fundamental devices
 Pentium consists of 3 million transistors
 Compaq Alpha consists of 9 million transistors
 Now we can build chips with more than 100 million transistors
Basic Concepts
 Simple gates
 AND
 OR
 NOT
 Functionality can be
expressed by a truth table
 A truth table lists output for
each possible input
combination
 Precedence
 NOT > AND > OR
 F = A B + A B
= (A (B)) + ((A) B)
Basic Concepts (cont.)
 Additional useful gates
 NAND
 NOR
 XOR
 NAND = AND + NOT
 NOR = OR + NOT
 XOR implements
exclusive-OR function
 NAND and NOR gates
require only 2 transistors
 AND and OR need 3
transistors!
Basic Concepts (cont.)
 Proving NAND gate is universal
Basic Concepts (cont.)
 Proving NOR gate is universal
© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved
Floyd, Digital Fundamentals, 10th ed
The XOR gate produces a HIGH output only when the
inputs are at opposite logic levels. The truth table is
The XOR Gate
Inputs
A B X
Output
0 0
0 1
1 0
1 1
0
1
1
0
A
B
X A
B
X
= 1
The XOR operation is written as X = AB + AB.
Alternatively, it can be written with a circled plus sign
between the variables as X = A + B.
XOR and XNOR Gates
© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved
Floyd, Digital Fundamentals, 10th ed
Example waveforms:
A
X
Notice that the XOR gate will produce a HIGH only when exactly one
input is HIGH.
The XOR Gate
B
A
B
X A
B
X
= 1
© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved
Floyd, Digital Fundamentals, 10th ed
The XNOR gate produces a HIGH output only when the
inputs are at the same logic level. The truth table is
The XNOR Gate
Inputs
A B X
Output
0 0
0 1
1 0
1 1
1
0
0
1
A
B
X A
B
X
The XNOR operation can be shown as X = AB + AB.
= 1
© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved
Floyd, Digital Fundamentals, 10th ed
Example waveforms:
A
X
Notice that the XNOR gate will produce a HIGH when both inputs are
the same. This makes it useful for comparison functions.
The XNOR Gate
B
A
B
X A
B
X
= 1
Logic Chips
Logic Chips (cont.)
 Integration levels
 SSI (small scale integration)
 Introduced in late 1960s
 1-10 gates (previous examples)
 MSI (medium scale integration)
 Introduced in late 1960s
 10-100 gates
 LSI (large scale integration)
 Introduced in early 1970s
 100-10,000 gates
 VLSI (very large scale integration)
 Introduced in late 1970s
 More than 10,000 gates
Logic Functions
 Number of functions
 With N logical variables, we can define
2
N
combination of inputs
 A function relates outputs to inputs
 Some of them are useful
 AND, NAND, NOR, XOR, …
 Some are not useful:
 Output is always 1
 Output is always 0
Logic Functions
 Logical functions can be expressed in several ways:
 Truth table
 Logical expressions
 Graphical form
 Example:
 Majority function
 Output is one whenever majority of inputs is 1
 We use 3-input majority function
Logic Functions (cont.)
3-input majority function
A B C F
0 0 0 0
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 1
 Logical expression form
F = A B + B C + A C
Logical Equivalence
 All three circuits implement F = A B function
Logical Equivalence
 Derivation of logical expression from a circuit
 Trace from the input to output
 Write down intermediate logical expressions along the path
Logical Equivalence (cont.)
 Proving logical equivalence: Truth table method
A B F1 = A B F3 = (A + B) (A + B) (A + B)
0 0 0 0
0 1 0 0
1 0 0 0
1 1 1 1

More Related Content

Similar to logic gates functions.pptx

Logic gates and NAND and NOR univarsal gates
Logic gates and NAND and NOR univarsal gatesLogic gates and NAND and NOR univarsal gates
Logic gates and NAND and NOR univarsal gatesDhwanil Champaneria
 
Digital logic Gates of Computer Science
Digital logic Gates of Computer ScienceDigital logic Gates of Computer Science
Digital logic Gates of Computer ScienceAnil Kumar Prajapati
 
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.Satya P. Joshi
 
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates. Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates. Satya P. Joshi
 
chapter 3 Boolean algebra (2).pptx
chapter 3 Boolean algebra (2).pptxchapter 3 Boolean algebra (2).pptx
chapter 3 Boolean algebra (2).pptxRithinA1
 
Digital Electronics Logic gates
Digital Electronics Logic gatesDigital Electronics Logic gates
Digital Electronics Logic gatesMD Mahadi Hasan
 
Digital Electronics-Review of Logic Gates.pptx
Digital Electronics-Review of Logic Gates.pptxDigital Electronics-Review of Logic Gates.pptx
Digital Electronics-Review of Logic Gates.pptxProfVilasShamraoPati
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuitsHareem Aslam
 
Name dld preparation
Name dld preparationName dld preparation
Name dld preparationPadam Rai
 
ICT Basic Logic Gates Lessons.pptx
ICT Basic Logic Gates Lessons.pptxICT Basic Logic Gates Lessons.pptx
ICT Basic Logic Gates Lessons.pptxChristianVelchez2
 
Digital electronics nandhini kusuma
Digital electronics nandhini kusumaDigital electronics nandhini kusuma
Digital electronics nandhini kusumakusuma11
 

Similar to logic gates functions.pptx (20)

Logic gates and NAND and NOR univarsal gates
Logic gates and NAND and NOR univarsal gatesLogic gates and NAND and NOR univarsal gates
Logic gates and NAND and NOR univarsal gates
 
Digital logic Gates of Computer Science
Digital logic Gates of Computer ScienceDigital logic Gates of Computer Science
Digital logic Gates of Computer Science
 
logic gates
logic gates logic gates
logic gates
 
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
 
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates. Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
 
Logic gates
Logic gatesLogic gates
Logic gates
 
Digital Basics
Digital BasicsDigital Basics
Digital Basics
 
chapter 3 Boolean algebra (2).pptx
chapter 3 Boolean algebra (2).pptxchapter 3 Boolean algebra (2).pptx
chapter 3 Boolean algebra (2).pptx
 
Digital Electronics Logic gates
Digital Electronics Logic gatesDigital Electronics Logic gates
Digital Electronics Logic gates
 
9. logic gates._rr
9. logic gates._rr9. logic gates._rr
9. logic gates._rr
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuits
 
2dig circ
2dig circ2dig circ
2dig circ
 
Digital Electronics-Review of Logic Gates.pptx
Digital Electronics-Review of Logic Gates.pptxDigital Electronics-Review of Logic Gates.pptx
Digital Electronics-Review of Logic Gates.pptx
 
class xi pptx-1.pptx
class xi pptx-1.pptxclass xi pptx-1.pptx
class xi pptx-1.pptx
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuits
 
Logical Gates
Logical GatesLogical Gates
Logical Gates
 
Name dld preparation
Name dld preparationName dld preparation
Name dld preparation
 
Logic gates
Logic gatesLogic gates
Logic gates
 
ICT Basic Logic Gates Lessons.pptx
ICT Basic Logic Gates Lessons.pptxICT Basic Logic Gates Lessons.pptx
ICT Basic Logic Gates Lessons.pptx
 
Digital electronics nandhini kusuma
Digital electronics nandhini kusumaDigital electronics nandhini kusuma
Digital electronics nandhini kusuma
 

Recently uploaded

The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 

Recently uploaded (20)

The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 

logic gates functions.pptx

  • 1. Unit 2 Logic Gates and Functions
  • 2. Unit 2: Logic Gates and Functions Overview • Introduction to Digital Logic Gates • Truth table • Symbol • Universal Gates (NAND/NOR) • XOR and XNOR Gates • Logic Chips • Logic Functions • Logical Equivalence • Standard Forms (SOP/POS)
  • 3. Introduction to Digital Logic Basics  Hardware consists of a few simple building blocks  These are called logic gates  AND, OR, NOT, …  NAND, NOR, XOR, …  Logic gates are built using transistors  NOT gate can be implemented by a single transistor  AND gate requires 3 transistors  Transistors are the fundamental devices  Pentium consists of 3 million transistors  Compaq Alpha consists of 9 million transistors  Now we can build chips with more than 100 million transistors
  • 4. Basic Concepts  Simple gates  AND  OR  NOT  Functionality can be expressed by a truth table  A truth table lists output for each possible input combination  Precedence  NOT > AND > OR  F = A B + A B = (A (B)) + ((A) B)
  • 5.
  • 6. Basic Concepts (cont.)  Additional useful gates  NAND  NOR  XOR  NAND = AND + NOT  NOR = OR + NOT  XOR implements exclusive-OR function  NAND and NOR gates require only 2 transistors  AND and OR need 3 transistors!
  • 7. Basic Concepts (cont.)  Proving NAND gate is universal
  • 8.
  • 9. Basic Concepts (cont.)  Proving NOR gate is universal
  • 10.
  • 11. © 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved Floyd, Digital Fundamentals, 10th ed The XOR gate produces a HIGH output only when the inputs are at opposite logic levels. The truth table is The XOR Gate Inputs A B X Output 0 0 0 1 1 0 1 1 0 1 1 0 A B X A B X = 1 The XOR operation is written as X = AB + AB. Alternatively, it can be written with a circled plus sign between the variables as X = A + B. XOR and XNOR Gates
  • 12. © 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved Floyd, Digital Fundamentals, 10th ed Example waveforms: A X Notice that the XOR gate will produce a HIGH only when exactly one input is HIGH. The XOR Gate B A B X A B X = 1
  • 13. © 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved Floyd, Digital Fundamentals, 10th ed The XNOR gate produces a HIGH output only when the inputs are at the same logic level. The truth table is The XNOR Gate Inputs A B X Output 0 0 0 1 1 0 1 1 1 0 0 1 A B X A B X The XNOR operation can be shown as X = AB + AB. = 1
  • 14. © 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved Floyd, Digital Fundamentals, 10th ed Example waveforms: A X Notice that the XNOR gate will produce a HIGH when both inputs are the same. This makes it useful for comparison functions. The XNOR Gate B A B X A B X = 1
  • 16. Logic Chips (cont.)  Integration levels  SSI (small scale integration)  Introduced in late 1960s  1-10 gates (previous examples)  MSI (medium scale integration)  Introduced in late 1960s  10-100 gates  LSI (large scale integration)  Introduced in early 1970s  100-10,000 gates  VLSI (very large scale integration)  Introduced in late 1970s  More than 10,000 gates
  • 17. Logic Functions  Number of functions  With N logical variables, we can define 2 N combination of inputs  A function relates outputs to inputs  Some of them are useful  AND, NAND, NOR, XOR, …  Some are not useful:  Output is always 1  Output is always 0
  • 18. Logic Functions  Logical functions can be expressed in several ways:  Truth table  Logical expressions  Graphical form  Example:  Majority function  Output is one whenever majority of inputs is 1  We use 3-input majority function
  • 19. Logic Functions (cont.) 3-input majority function A B C F 0 0 0 0 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 1  Logical expression form F = A B + B C + A C
  • 20. Logical Equivalence  All three circuits implement F = A B function
  • 21. Logical Equivalence  Derivation of logical expression from a circuit  Trace from the input to output  Write down intermediate logical expressions along the path
  • 22. Logical Equivalence (cont.)  Proving logical equivalence: Truth table method A B F1 = A B F3 = (A + B) (A + B) (A + B) 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1