SlideShare a Scribd company logo
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)
logic gates functions.pptx
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
logic gates functions.pptx
Basic Concepts (cont.)
 Proving NOR gate is universal
logic gates functions.pptx
© 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

PPT
unit-2_logic_gates_functions.ppt
PPTX
Logic Gates.pptx
PPTX
Lecture 04-Digital logic gates.pptx
PPTX
Computer System Architecture lecture 12 GLAU
PPT
Lec 2 digital basics
unit-2_logic_gates_functions.ppt
Logic Gates.pptx
Lecture 04-Digital logic gates.pptx
Computer System Architecture lecture 12 GLAU
Lec 2 digital basics

Similar to logic gates functions.pptx (20)

PPTX
combinational _logic_circuit_digital.pptx
PPTX
Logic gates and NAND and NOR univarsal gates
PPTX
Digital logic Gates of Computer Science
PPT
5. ch-5 Logic Gates in Computer Science.ppt
PPTX
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
PPTX
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
PDF
logic gates
PPTX
Logic gates
PPTX
Boolean Aljabra.pptx of dld and computer
PDF
Logic Gates.pdf A short evaluation and description of logic gates
PPTX
chapter 3 Boolean algebra (2).pptx
PPT
Digital Electronics Logic gates
PPT
9. logic gates._rr
PPT
Combinational circuits
PPT
PPTX
Digital Electronics-Review of Logic Gates.pptx
PPTX
class xi pptx-1.pptx
PPT
Combinational circuits
DOCX
combinational-circuit____gates_456788 (2).docx
combinational _logic_circuit_digital.pptx
Logic gates and NAND and NOR univarsal gates
Digital logic Gates of Computer Science
5. ch-5 Logic Gates in Computer Science.ppt
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
logic gates
Logic gates
Boolean Aljabra.pptx of dld and computer
Logic Gates.pdf A short evaluation and description of logic gates
chapter 3 Boolean algebra (2).pptx
Digital Electronics Logic gates
9. logic gates._rr
Combinational circuits
Digital Electronics-Review of Logic Gates.pptx
class xi pptx-1.pptx
Combinational circuits
combinational-circuit____gates_456788 (2).docx
Ad

Recently uploaded (20)

PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
Cell Structure & Organelles in detailed.
PDF
Basic Mud Logging Guide for educational purpose
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Sports Quiz easy sports quiz sports quiz
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Institutional Correction lecture only . . .
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
master seminar digital applications in india
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
RMMM.pdf make it easy to upload and study
PDF
Computing-Curriculum for Schools in Ghana
PDF
Pre independence Education in Inndia.pdf
PPTX
Cell Types and Its function , kingdom of life
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
Supply Chain Operations Speaking Notes -ICLT Program
Cell Structure & Organelles in detailed.
Basic Mud Logging Guide for educational purpose
Microbial disease of the cardiovascular and lymphatic systems
Microbial diseases, their pathogenesis and prophylaxis
Sports Quiz easy sports quiz sports quiz
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Renaissance Architecture: A Journey from Faith to Humanism
O7-L3 Supply Chain Operations - ICLT Program
Institutional Correction lecture only . . .
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Abdominal Access Techniques with Prof. Dr. R K Mishra
FourierSeries-QuestionsWithAnswers(Part-A).pdf
master seminar digital applications in india
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
RMMM.pdf make it easy to upload and study
Computing-Curriculum for Schools in Ghana
Pre independence Education in Inndia.pdf
Cell Types and Its function , kingdom of life
Module 4: Burden of Disease Tutorial Slides S2 2025
Ad

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)
  • 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
  • 9. Basic Concepts (cont.)  Proving NOR gate is universal
  • 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