SlideShare a Scribd company logo
1 of 32
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

Similar to unit-2_logic_gates_functions.ppt

combinational _logic_circuit_digital.pptx
combinational _logic_circuit_digital.pptxcombinational _logic_circuit_digital.pptx
combinational _logic_circuit_digital.pptxNadzlinIbrahim3
 
Principles of Combinational Logic-1
Principles of Combinational Logic-1Principles of Combinational Logic-1
Principles of Combinational Logic-1Supanna Shirguppe
 
chapter 3 Boolean algebra (2).pptx
chapter 3 Boolean algebra (2).pptxchapter 3 Boolean algebra (2).pptx
chapter 3 Boolean algebra (2).pptxRithinA1
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuitsHareem Aslam
 
Digital Electronics Logic gates
Digital Electronics Logic gatesDigital Electronics Logic gates
Digital Electronics Logic gatesMD Mahadi Hasan
 
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theoremsarunachalamr16
 
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 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
 
Combinational logic circuits design and implementation
Combinational logic circuits design and implementationCombinational logic circuits design and implementation
Combinational logic circuits design and implementationssuserca5764
 
Lec4-Algghhhhgghgjhf5dvbgyuygit87678.pdf
Lec4-Algghhhhgghgjhf5dvbgyuygit87678.pdfLec4-Algghhhhgghgjhf5dvbgyuygit87678.pdf
Lec4-Algghhhhgghgjhf5dvbgyuygit87678.pdfabdnazar2003
 
1Boolean Alegebra 3booleanalgebraold-160325120651.pdf
1Boolean Alegebra 3booleanalgebraold-160325120651.pdf1Boolean Alegebra 3booleanalgebraold-160325120651.pdf
1Boolean Alegebra 3booleanalgebraold-160325120651.pdfsiliconvalley6203
 
Knowledge Engineering in FOL.
Knowledge Engineering in FOL.Knowledge Engineering in FOL.
Knowledge Engineering in FOL.Megha Sharma
 

Similar to unit-2_logic_gates_functions.ppt (20)

combinational _logic_circuit_digital.pptx
combinational _logic_circuit_digital.pptxcombinational _logic_circuit_digital.pptx
combinational _logic_circuit_digital.pptx
 
Principles of Combinational Logic-1
Principles of Combinational Logic-1Principles of Combinational Logic-1
Principles of Combinational Logic-1
 
chapter 3 Boolean algebra (2).pptx
chapter 3 Boolean algebra (2).pptxchapter 3 Boolean algebra (2).pptx
chapter 3 Boolean algebra (2).pptx
 
2dig circ
2dig circ2dig circ
2dig circ
 
9. logic gates._rr
9. logic gates._rr9. logic gates._rr
9. logic gates._rr
 
dld.ppt
dld.pptdld.ppt
dld.ppt
 
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
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuits
 
Digital Electronics Logic gates
Digital Electronics Logic gatesDigital Electronics Logic gates
Digital Electronics Logic gates
 
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems
 
Chapter 3 2
Chapter 3 2Chapter 3 2
Chapter 3 2
 
Boolean algebra
Boolean algebraBoolean algebra
Boolean algebra
 
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 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
 
13 Boolean Algebra
13 Boolean Algebra13 Boolean Algebra
13 Boolean Algebra
 
Combinational logic circuits design and implementation
Combinational logic circuits design and implementationCombinational logic circuits design and implementation
Combinational logic circuits design and implementation
 
Lec4-Algghhhhgghgjhf5dvbgyuygit87678.pdf
Lec4-Algghhhhgghgjhf5dvbgyuygit87678.pdfLec4-Algghhhhgghgjhf5dvbgyuygit87678.pdf
Lec4-Algghhhhgghgjhf5dvbgyuygit87678.pdf
 
1Boolean Alegebra 3booleanalgebraold-160325120651.pdf
1Boolean Alegebra 3booleanalgebraold-160325120651.pdf1Boolean Alegebra 3booleanalgebraold-160325120651.pdf
1Boolean Alegebra 3booleanalgebraold-160325120651.pdf
 
Knowledge Engineering in FOL.
Knowledge Engineering in FOL.Knowledge Engineering in FOL.
Knowledge Engineering in FOL.
 

Recently uploaded

Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...SUHANI PANDEY
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfRagavanV2
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoordharasingh5698
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdfSuman Jyoti
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 

Recently uploaded (20)

Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdf
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 

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.