SlideShare a Scribd company logo
Unit 2
College of Computer and Information Sciences
Department of Computer Science
CSC 220: Computer Organization
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)
Chapter-2
M. Morris Mano, Charles R. Kime and Tom Martin, Logic and Computer Design
Fundamentals, Global (5th) Edition, Pearson Education Limited, 2016. ISBN: 9781292096124
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
Standard Forms for
Boolean Expressions
 Sum-of-Products (SOP)
 Derived from the Truth table for a function by
considering those rows for which F = 1.
 The logical sum (OR) of product (AND) terms.
 Realized using an AND-OR circuit.
 Product-of-Sums (POS)
 Derived from the Truth table for a function by
considering those rows for which F = 0.
 The logical product (AND) of sum (OR) terms.
 Realized using an OR-AND circuit.
21
1
22
Minterms
Sum-of-Products
 Any function F can be represented by a sum of
minterms, where each minterm is ANDed with the
corresponding value of the output for F.
 F = S (mi . fi)
 where mi is a minterm
 and fi is the corresponding functional output
 Only the minterms for which fi = 1 appear in the
expression for function F.
 F = S (mi) = S m(i)
shorthand notation
Denotes the logical
sum operation
25
Sum-of-Products
 Sum of minterms are a.k.a. Canonical Sum-of-
Products
 Synthesis process
 Determine the Canonical Sum-of-Products
 Use Boolean Algebra (and K-maps) to find an
optimal, functionally equivalent, expression.
27
2
28
Maxterms
Product-of-Sums
 Any function F can be represented by a product of
Maxterms, where each Maxterm is ANDed with the
complement of the corresponding value of the output
for F.
 F = P (Mi . f 'i)
 where Mi is a Maxterm
 and f 'i is the complement of the
corresponding functional output
 Only the Maxterms for which fi = 0 appear in the
expression for function F.
 F = P (Mi) = P M(i) shorthand notation
Denotes the logical
product operation
31
0
When the o/p is Zero
When the o/p is 1
Product-of-Sums
 The Canonical Product-of-Sums for function F is the
Product-of-Sums expression in which each sum
term is a Maxterm.
 Synthesis process
 Determine the Canonical Product-of-Sums
 Use Boolean Algebra (and K-maps) to find an
optimal, functionally equivalent, expression.

More Related Content

PPTX
logic gates functions.pptx
PDF
Simplification of Circuits.pdf
PDF
Digital electronics logic design complete notes.pdf
PDF
FYBSC IT Digital Electronics Unit II Chapter I Boolean Algebra and Logic Gates
PPT
Digital Basics
logic gates functions.pptx
Simplification of Circuits.pdf
Digital electronics logic design complete notes.pdf
FYBSC IT Digital Electronics Unit II Chapter I Boolean Algebra and Logic Gates
Digital Basics

Similar to unit-2_logic_gates_functions.ppt (20)

PPT
Lec 2 digital basics
PDF
Unit 3.1
PPT
basic logic gates
PPTX
Logic Gates.pptx
PPTX
Chapter 4. logic function and boolean algebra
PPT
Logic Gates (1).ppt
PPTX
Digital electronics basic overview .pptx
PDF
Lec4-Algghhhhgghgjhf5dvbgyuygit87678.pdf
PPTX
assignment_mathematics.pptx
PPTX
Digital Electronics-Review of Logic Gates.pptx
PPTX
FALLSEM2022-23_BECE102L_TH_VL2022230104428_Reference_Material_I_25-07-2022_Mo...
PPT
Chapter 7. Functions of Combinational Logic
PPT
PPT
Cit 1101 lec 03
PPT
Digital Logic Design
PPTX
chapter3.pptx electrical engineering for university
PPTX
gadhegadaedjsrijfzshbnzskfrkjsbipsjfdbdfnbdfkbj
PDF
3 further logic concepts
Lec 2 digital basics
Unit 3.1
basic logic gates
Logic Gates.pptx
Chapter 4. logic function and boolean algebra
Logic Gates (1).ppt
Digital electronics basic overview .pptx
Lec4-Algghhhhgghgjhf5dvbgyuygit87678.pdf
assignment_mathematics.pptx
Digital Electronics-Review of Logic Gates.pptx
FALLSEM2022-23_BECE102L_TH_VL2022230104428_Reference_Material_I_25-07-2022_Mo...
Chapter 7. Functions of Combinational Logic
Cit 1101 lec 03
Digital Logic Design
chapter3.pptx electrical engineering for university
gadhegadaedjsrijfzshbnzskfrkjsbipsjfdbdfnbdfkbj
3 further logic concepts
Ad

Recently uploaded (20)

PPTX
additive manufacturing of ss316l using mig welding
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPT
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPTX
UNIT 4 Total Quality Management .pptx
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PDF
Digital Logic Computer Design lecture notes
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PPTX
Sustainable Sites - Green Building Construction
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
Artificial Intelligence
PPTX
Internet of Things (IOT) - A guide to understanding
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PPTX
web development for engineering and engineering
PPT
Project quality management in manufacturing
additive manufacturing of ss316l using mig welding
Foundation to blockchain - A guide to Blockchain Tech
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
UNIT 4 Total Quality Management .pptx
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Digital Logic Computer Design lecture notes
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
Sustainable Sites - Green Building Construction
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Artificial Intelligence
Internet of Things (IOT) - A guide to understanding
R24 SURVEYING LAB MANUAL for civil enggi
web development for engineering and engineering
Project quality management in manufacturing
Ad

unit-2_logic_gates_functions.ppt

  • 1. Unit 2 College of Computer and Information Sciences Department of Computer Science CSC 220: Computer Organization 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) Chapter-2 M. Morris Mano, Charles R. Kime and Tom Martin, Logic and Computer Design Fundamentals, Global (5th) Edition, Pearson Education Limited, 2016. ISBN: 9781292096124
  • 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. 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!
  • 6. Basic Concepts (cont.)  Proving NAND gate is universal
  • 7. Basic Concepts (cont.)  Proving NOR gate is universal
  • 8. © 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
  • 9. © 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
  • 10. © 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
  • 11. © 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
  • 13. 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
  • 14. 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
  • 15. 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
  • 16. 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
  • 17. Logical Equivalence  All three circuits implement F = A B function
  • 18. Logical Equivalence  Derivation of logical expression from a circuit  Trace from the input to output  Write down intermediate logical expressions along the path
  • 19. 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
  • 20. Standard Forms for Boolean Expressions  Sum-of-Products (SOP)  Derived from the Truth table for a function by considering those rows for which F = 1.  The logical sum (OR) of product (AND) terms.  Realized using an AND-OR circuit.  Product-of-Sums (POS)  Derived from the Truth table for a function by considering those rows for which F = 0.  The logical product (AND) of sum (OR) terms.  Realized using an OR-AND circuit.
  • 21. 21 1
  • 22. 22
  • 24. Sum-of-Products  Any function F can be represented by a sum of minterms, where each minterm is ANDed with the corresponding value of the output for F.  F = S (mi . fi)  where mi is a minterm  and fi is the corresponding functional output  Only the minterms for which fi = 1 appear in the expression for function F.  F = S (mi) = S m(i) shorthand notation Denotes the logical sum operation
  • 25. 25
  • 26. Sum-of-Products  Sum of minterms are a.k.a. Canonical Sum-of- Products  Synthesis process  Determine the Canonical Sum-of-Products  Use Boolean Algebra (and K-maps) to find an optimal, functionally equivalent, expression.
  • 27. 27 2
  • 28. 28
  • 30. Product-of-Sums  Any function F can be represented by a product of Maxterms, where each Maxterm is ANDed with the complement of the corresponding value of the output for F.  F = P (Mi . f 'i)  where Mi is a Maxterm  and f 'i is the complement of the corresponding functional output  Only the Maxterms for which fi = 0 appear in the expression for function F.  F = P (Mi) = P M(i) shorthand notation Denotes the logical product operation
  • 31. 31 0 When the o/p is Zero When the o/p is 1
  • 32. Product-of-Sums  The Canonical Product-of-Sums for function F is the Product-of-Sums expression in which each sum term is a Maxterm.  Synthesis process  Determine the Canonical Product-of-Sums  Use Boolean Algebra (and K-maps) to find an optimal, functionally equivalent, expression.