Digital Logic

Dilum Bandara
Dilum BandaraResearch Scientist at Data61, CSIRO
Digital Logic
CS2052 Computer Architecture
Computer Science & Engineering
University of Moratuwa
Dilum Bandara
Dilum.Bandara@uom.lk
Outline
 Logic gates
 Boolean Algebra
 Kanaugh Maps
2
Logic Gates
 Every digital device is based on a set of chips
designed to store & process information
 Basic building blocks of these chips are logic
gates
 Implementation of gates can be different
 Different materials & fabrication technologies
 Different operating voltages
 e.g., 5v vs. 0v, 3+v vs. 0.5v
 Today, they go as low as 1.9 - 2.1v
 But their logical behavior is consistent across all
computers
3
Common Logic Gates
 NOT/inverter
 AND
4
Truth table
Algebraic function
Common Logic Gates (Cont.)
 OR
 NAND
5
Common Logic Gates (Cont.)
 NOR
 XOR/EXOR (Exclusive OR)
6
Common Logic Gates (Cont.)
 NXOR/EXNOR (Exclusive NOR)
7
Exercise
 Implement 3-input AND using 2-inputs ANDs
 Implement a NOT gate using a NAND
8
Fundamental Logic Gate
 2-input NAND gate can be used to build any
other gate
9
Exercise
 Implement AND using NANDs
 Homework
 Implement following gates using NANDs
 OR
 XOR
10
Boolean Algebra
 Boolean variable
 Takes only 2 values – either TRUE (1) or FALSE (0)
 Boolean function
 Mapping from Boolean variables to a Boolean value
 Application
 Can represent complex relationships in a digital circuit
 Boolean algebra
 Deals with binary variables & logic operations
operating on those variables
 Application
 Can simplify a relationship among multiple inputs in a digital
circuit 11
Basic Identities of Boolean Algebra
 Basic operations
 AND (.), OR (+), NOT (– or /)
 0 – FALSE
 1 – TRUE
x + 0 = x x + x = x
x · 0 = 0 x . x = x
x + 1 = 1 x + x/ = 1
x · 1 = x x · x / = 0
12
Basic Identities (Cont.)
 Commutativity
x + y = y + x
xy = yx
 Associativity
x + ( y + z ) = ( x + y ) + z
x (yz) = (xy) z
 Distributivity
x ( y + z ) = xy + xz
x + yz = ( x + y )( x + z)
13
Textbook has a typo
Basic Identities (Cont.)
 DeMorgan’s Theorem
( x + y )/ = x/ y/
( xy )/ = x/ + y/
 Generalized DeMorgan's Theorem
(a + b + … z) / = a / b / … z /
(a.b … z) / = a / + b / + … z /
 Involution
(x /) / = x
14
Exercise
 Simplify following functions using Boolean Algebra
 a + ab
 a(a + b)
 a(a / + b)
 a + a/ b
 (a + b.c) /
a + ab = a(1+b)=a
a(a + b) = a.a +ab=a+ab=a(1+b)=a
a + a'b = (a + a')(a + b)=1(a + b) =a+b
a(a' + b) = a.a' +ab=0+ab=ab
(a + b.c)' = a'.b' + a'.c' 15
Homework
 Show steps for following simplifications
 (a + b)(a + b') = a
 ab + ab'c = ab + ac
 (a + b)(a + b' + c) = a + bc
 (a(b + z(x + a')))' = a' + b' (z' + x')
 (a(b + c) + a'b)'=b'(a' + c')
 (a + b)(a' + c)(b + c) = (a + b)(a' + c)
 No need to submit answers
16
Minterms
 Minterm
 Each combination of variables in a truth table
 As no of digital inputs (Boolean variables)
increase no of minterms increase
 2n minterms for n inputs
 As n increases
 Large truth tables
 Long Boolean functions
 Easier to represent using decimal equivalent of
sum of minterms
 F(a, b, c) = Σ (2, 4, 5, 7) 17
Exercise
 Represent all odd numbers between 0 – 7 as a sum of
minterms
 F(a, b, c) = Σ (1, 3, 5, 7)
 Use Boolean Algebra to simplify above function
Σ (1, 3, 5, 7) = a‘b‘c + a‘bc + ab‘c + abc
= a‘c(b‘ + b) + ac (b‘ + b)
= a‘c + ac = c (a‘+ a) = c
18
Sum of Products
Karnaugh Map (K-Map)
 Pictorial representation of a truth table
 Map of squares – each square for each minterm
 Adjacent squares change in minterm only by one
variable
19
bc
a
00 01 11 10
0 0 1 3 2
1 4 5 7 6
Decimal equivalent
of minterm
Example – 3 Variable K-Map
 Simplify represent of all odd numbers between 0 – 7
 F(a, b, c) = Σ (1, 3, 5, 7)
20
ab
c
00
01
11
10
0 1
1
1
1
1
0
0
0
0
= c
Exercise – 3 Variable K-Map
 Simplify following expression using a K-map
21
ab
c
00
01
11
10
0 1
1
0
0
0
1
1
0
0
= a’c’ + a’b’
Kanaugh Map – Simplification
 Squares containing 1’s are grouped to get sum-
of-product expression
 Group size must be 2n
 Group must be in rectangular shape
 Each group represents an algebraic term
 Its OK for groups to overlap
 OR of all those terms is the final expression
 Maximum group size  better simplification
 A don’t care (X) can be interpreted as either 0 or 1
when needed, only if it contributes to simplification
 Don’t group Xs together!
22
4 Variable K-Map
23
Example – 4 Variable K-Map
24
Exercise – 4 Variable K-Map
 What would be a Boolean expression of a circuit
that detects all even numbers between 0 – 15?
 Present as a sum of minterms
25
5 Variable K-Map – Option 1
26
BC
DE
A
1
/0
00 01 11 10
00
01
11
10
0
5
3
1
8124
2
20
11
106
7
14
16
13 9
15
19
18
17
28 24
31
2921
23
3022 26
25
27
Example – 5 Variable K-Map
 What would be a Boolean expression of a circuit
to detect all prime numbers between 0 & 31?
27
BC
DE
A
1
/0
00 01 11 10
00
01
11
10
0
5
3
1
8124
2
20
11
106
7
14
16
13 9
15
19
18
17
28 24
31
2921
23
3022 26
25
27
5 Variable K-Map – Option 2
28
Example – 5 Variable K-Map – Option 2
29
6 Variable K-Map
30
Simplification as Product of Sum
 Some times it is useful to obtain the algebraic
expression as a product of sums
 Can be obtained by finding sum of products for
F/ & converting it to F
 To find F/ Group 0s in a K-map
 F(a, b, c) = Σ (1, 3, 5, 7) = Π (1, 3, 5, 7)
31
Exercise – Product of Sum
 Find sum-of-product & product-of-sum
representation of following K-map
32
ab
c
00
01
11
10
0 1
1
x
1
1
0
0
0
1
F(a, b, c) = ab’ + c
F/(a, b, c) = a’c’ + bc’
(F/(a, b, c)) / = (a + c)(b’ + c)
= F(a, b, c)
1 of 32

Recommended

Chapter 1 Introduction to Digital Logic by
Chapter 1 Introduction to Digital LogicChapter 1 Introduction to Digital Logic
Chapter 1 Introduction to Digital LogicISMT College
187 views35 slides
Introduction to digital logic by
Introduction to digital logicIntroduction to digital logic
Introduction to digital logicKamal Acharya
2.9K views57 slides
Chapter 1 Introduction to Digital Logic by
Chapter 1 Introduction to Digital LogicChapter 1 Introduction to Digital Logic
Chapter 1 Introduction to Digital LogicISMT College
64 views34 slides
Lecture 5: The Convolution Sum by
Lecture 5: The Convolution SumLecture 5: The Convolution Sum
Lecture 5: The Convolution SumJawaher Abdulwahab Fadhil
15.3K views26 slides
25. complex frequency, network function ,poles and zeros by
25. complex frequency, network function ,poles and zeros25. complex frequency, network function ,poles and zeros
25. complex frequency, network function ,poles and zerosshwetabhardwaj48
196 views13 slides
Applications laplace transform by
Applications laplace transformApplications laplace transform
Applications laplace transformMuhammad Fadli
2.4K views56 slides

More Related Content

What's hot

Digital logic circuit by
Digital logic circuitDigital logic circuit
Digital logic circuitAhmedabad Institute of technology
840 views36 slides
Chebyshev filter by
Chebyshev filterChebyshev filter
Chebyshev filterMOHAMMAD AKRAM
22.2K views11 slides
Analog to digital converters, adc by
Analog to digital converters, adcAnalog to digital converters, adc
Analog to digital converters, adcSaumya Ranjan Behura
24.3K views62 slides
BCD. by
BCD.BCD.
BCD.Meghana C M
3.2K views11 slides
Sensors and microcontroller interfacing by
Sensors and microcontroller interfacingSensors and microcontroller interfacing
Sensors and microcontroller interfacingmohamed albanna
37.2K views49 slides
Question Bank Programmable Logic Controller by
Question Bank Programmable Logic ControllerQuestion Bank Programmable Logic Controller
Question Bank Programmable Logic ControllerNilesh Bhaskarrao Bahadure
634 views13 slides

What's hot(20)

Sensors and microcontroller interfacing by mohamed albanna
Sensors and microcontroller interfacingSensors and microcontroller interfacing
Sensors and microcontroller interfacing
mohamed albanna37.2K views
Sensors and transducers by Anish Das
Sensors and transducersSensors and transducers
Sensors and transducers
Anish Das19.1K views
Resistive Sensors by Debasmit Das
Resistive SensorsResistive Sensors
Resistive Sensors
Debasmit Das9.9K views
BOOLEAN ALGEBRA AND LOGIC GATE by Tamim Tanvir
BOOLEAN ALGEBRA AND LOGIC GATE BOOLEAN ALGEBRA AND LOGIC GATE
BOOLEAN ALGEBRA AND LOGIC GATE
Tamim Tanvir9K views
Signal & systems by AJAL A J
Signal & systemsSignal & systems
Signal & systems
AJAL A J48.5K views
multiplexers and demultiplexers by Unsa Shakir
 multiplexers and demultiplexers multiplexers and demultiplexers
multiplexers and demultiplexers
Unsa Shakir4.4K views
discrete time signals and systems by Zlatan Ahmadovic
 discrete time signals and systems  discrete time signals and systems
discrete time signals and systems
Zlatan Ahmadovic13.9K views

Viewers also liked

Digital Logic Design-Lecture 5 by
Digital Logic Design-Lecture 5Digital Logic Design-Lecture 5
Digital Logic Design-Lecture 5Samia Sultana
447 views13 slides
Data Structure Basics by
Data Structure BasicsData Structure Basics
Data Structure BasicsShakila Mahjabin
1.5K views24 slides
Webpage Visual Design and Online Prototype by
Webpage Visual Design and Online PrototypeWebpage Visual Design and Online Prototype
Webpage Visual Design and Online Prototypeamoore155
262 views2 slides
Basics in algorithms and data structure by
Basics in algorithms and data structure Basics in algorithms and data structure
Basics in algorithms and data structure Eman magdy
414 views132 slides
Chapter 3.1 by
Chapter 3.1Chapter 3.1
Chapter 3.1sotlsoc
731 views10 slides
Chapter 7.4 by
Chapter 7.4Chapter 7.4
Chapter 7.4sotlsoc
242 views7 slides

Viewers also liked(20)

Digital Logic Design-Lecture 5 by Samia Sultana
Digital Logic Design-Lecture 5Digital Logic Design-Lecture 5
Digital Logic Design-Lecture 5
Samia Sultana447 views
Webpage Visual Design and Online Prototype by amoore155
Webpage Visual Design and Online PrototypeWebpage Visual Design and Online Prototype
Webpage Visual Design and Online Prototype
amoore155262 views
Basics in algorithms and data structure by Eman magdy
Basics in algorithms and data structure Basics in algorithms and data structure
Basics in algorithms and data structure
Eman magdy414 views
Chapter 3.1 by sotlsoc
Chapter 3.1Chapter 3.1
Chapter 3.1
sotlsoc731 views
Chapter 7.4 by sotlsoc
Chapter 7.4Chapter 7.4
Chapter 7.4
sotlsoc242 views
Logic Formulation 2 by deathful
Logic Formulation 2Logic Formulation 2
Logic Formulation 2
deathful3.1K views
Parity Generator and Parity Checker by Jignesh Navdiya
Parity Generator and Parity CheckerParity Generator and Parity Checker
Parity Generator and Parity Checker
Jignesh Navdiya46.3K views
Applied electronics-outcome-1 by doovood
Applied electronics-outcome-1Applied electronics-outcome-1
Applied electronics-outcome-1
doovood2.1K views
Problem Solving with Algorithms and Data Structure - Lists by Yi-Lung Tsai
Problem Solving with Algorithms and Data Structure - ListsProblem Solving with Algorithms and Data Structure - Lists
Problem Solving with Algorithms and Data Structure - Lists
Yi-Lung Tsai1.3K views
digital logic design Chapter 2 boolean_algebra_&_logic_gates by Imran Waris
digital logic design Chapter 2 boolean_algebra_&_logic_gatesdigital logic design Chapter 2 boolean_algebra_&_logic_gates
digital logic design Chapter 2 boolean_algebra_&_logic_gates
Imran Waris12.2K views
Problem Solving with Algorithms and Data Structure - Graphs by Yi-Lung Tsai
Problem Solving with Algorithms and Data Structure - GraphsProblem Solving with Algorithms and Data Structure - Graphs
Problem Solving with Algorithms and Data Structure - Graphs
Yi-Lung Tsai2.3K views
101495802 ee2258-lm-1 by homeworkping7
101495802 ee2258-lm-1101495802 ee2258-lm-1
101495802 ee2258-lm-1
homeworkping71.6K views
Digital logic gate and its application by Abdullah Al Masud
Digital logic gate and its applicationDigital logic gate and its application
Digital logic gate and its application
Abdullah Al Masud5.3K views
Digital Logic & Design (DLD) presentation by foyez ahammad
Digital Logic & Design (DLD) presentationDigital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentation
foyez ahammad9.4K views
digital logic design number system by Nallapati Anindra
digital logic design number systemdigital logic design number system
digital logic design number system
Nallapati Anindra17.5K views

Similar to Digital Logic

Basic gates and boolean algebra by
Basic gates and boolean algebraBasic gates and boolean algebra
Basic gates and boolean algebraSudheesh S Madhav
2.9K views37 slides
Chapter 3 2 by
Chapter 3 2Chapter 3 2
Chapter 3 2Ch Farhan
535 views50 slides
2dig circ by
2dig circ2dig circ
2dig circAremarati Ramakanth
322 views56 slides
Computer organiztion3 by
Computer organiztion3Computer organiztion3
Computer organiztion3Umang Gupta
1.8K views36 slides
DLD BOOLEAN EXPRESSIONS by
DLD BOOLEAN EXPRESSIONSDLD BOOLEAN EXPRESSIONS
DLD BOOLEAN EXPRESSIONSnaresh414857
8 views72 slides
WEEK 4- DLD-GateLvelMinimization.pptx by
WEEK 4- DLD-GateLvelMinimization.pptxWEEK 4- DLD-GateLvelMinimization.pptx
WEEK 4- DLD-GateLvelMinimization.pptxTaoqeerRajput
5 views58 slides

Similar to Digital Logic(20)

Chapter 3 2 by Ch Farhan
Chapter 3 2Chapter 3 2
Chapter 3 2
Ch Farhan535 views
Computer organiztion3 by Umang Gupta
Computer organiztion3Computer organiztion3
Computer organiztion3
Umang Gupta1.8K views
WEEK 4- DLD-GateLvelMinimization.pptx by TaoqeerRajput
WEEK 4- DLD-GateLvelMinimization.pptxWEEK 4- DLD-GateLvelMinimization.pptx
WEEK 4- DLD-GateLvelMinimization.pptx
TaoqeerRajput5 views
tutorial5.ppt by jvjfvvoa
tutorial5.ppttutorial5.ppt
tutorial5.ppt
jvjfvvoa0 views
Ec2203 digital electronics questions anna university by www.annaunivedu.org by annaunivedu
Ec2203 digital electronics questions anna university by www.annaunivedu.orgEc2203 digital electronics questions anna university by www.annaunivedu.org
Ec2203 digital electronics questions anna university by www.annaunivedu.org
annaunivedu10.1K views
Ch1 2 by rohity7
Ch1 2Ch1 2
Ch1 2
rohity787 views
Bitwise by Axel Ryo
BitwiseBitwise
Bitwise
Axel Ryo807 views
Boolean Algebra by SUKHDEEP SINGH by Sukhdeep Bisht
Boolean Algebra by SUKHDEEP SINGHBoolean Algebra by SUKHDEEP SINGH
Boolean Algebra by SUKHDEEP SINGH
Sukhdeep Bisht106 views

More from Dilum Bandara

Modeling Multi-Layer Access Control Policies of a Hyperledger-Fabric-Based Ag... by
Modeling Multi-Layer Access Control Policies of a Hyperledger-Fabric-Based Ag...Modeling Multi-Layer Access Control Policies of a Hyperledger-Fabric-Based Ag...
Modeling Multi-Layer Access Control Policies of a Hyperledger-Fabric-Based Ag...Dilum Bandara
230 views19 slides
A Decision Model for Choosing Patterns in Blockchain-based Applications by
A Decision Model for Choosing Patterns in Blockchain-based ApplicationsA Decision Model for Choosing Patterns in Blockchain-based Applications
A Decision Model for Choosing Patterns in Blockchain-based ApplicationsDilum Bandara
210 views16 slides
Smart Contract Testing by
Smart Contract TestingSmart Contract Testing
Smart Contract TestingDilum Bandara
363 views19 slides
Smart Contract Security Testing by
Smart Contract Security TestingSmart Contract Security Testing
Smart Contract Security TestingDilum Bandara
672 views21 slides
What's not a cloud by
What's not a cloudWhat's not a cloud
What's not a cloudDilum Bandara
516 views7 slides
Blockchain - A Catalyst for Solving Age-old Distributed Systems Problems by
Blockchain - A Catalyst for Solving Age-old Distributed Systems ProblemsBlockchain - A Catalyst for Solving Age-old Distributed Systems Problems
Blockchain - A Catalyst for Solving Age-old Distributed Systems ProblemsDilum Bandara
224 views18 slides

More from Dilum Bandara(20)

Modeling Multi-Layer Access Control Policies of a Hyperledger-Fabric-Based Ag... by Dilum Bandara
Modeling Multi-Layer Access Control Policies of a Hyperledger-Fabric-Based Ag...Modeling Multi-Layer Access Control Policies of a Hyperledger-Fabric-Based Ag...
Modeling Multi-Layer Access Control Policies of a Hyperledger-Fabric-Based Ag...
Dilum Bandara230 views
A Decision Model for Choosing Patterns in Blockchain-based Applications by Dilum Bandara
A Decision Model for Choosing Patterns in Blockchain-based ApplicationsA Decision Model for Choosing Patterns in Blockchain-based Applications
A Decision Model for Choosing Patterns in Blockchain-based Applications
Dilum Bandara210 views
Smart Contract Security Testing by Dilum Bandara
Smart Contract Security TestingSmart Contract Security Testing
Smart Contract Security Testing
Dilum Bandara672 views
Blockchain - A Catalyst for Solving Age-old Distributed Systems Problems by Dilum Bandara
Blockchain - A Catalyst for Solving Age-old Distributed Systems ProblemsBlockchain - A Catalyst for Solving Age-old Distributed Systems Problems
Blockchain - A Catalyst for Solving Age-old Distributed Systems Problems
Dilum Bandara224 views
Protocols for Fast Delivery of Large Data Volumes by Dilum Bandara
Protocols for Fast Delivery of Large Data VolumesProtocols for Fast Delivery of Large Data Volumes
Protocols for Fast Delivery of Large Data Volumes
Dilum Bandara208 views
Content-Centric Networking (CCN) by Dilum Bandara
Content-Centric Networking (CCN)Content-Centric Networking (CCN)
Content-Centric Networking (CCN)
Dilum Bandara975 views
Internet Architecture and Design Philosophy by Dilum Bandara
Internet Architecture and Design PhilosophyInternet Architecture and Design Philosophy
Internet Architecture and Design Philosophy
Dilum Bandara904 views
Transactions and Concurrency Control by Dilum Bandara
Transactions and Concurrency ControlTransactions and Concurrency Control
Transactions and Concurrency Control
Dilum Bandara4.2K views
Physical and Logical Clocks by Dilum Bandara
Physical and Logical ClocksPhysical and Logical Clocks
Physical and Logical Clocks
Dilum Bandara9.6K views
Content Delivery Networks (CDN) by Dilum Bandara
Content Delivery Networks (CDN)Content Delivery Networks (CDN)
Content Delivery Networks (CDN)
Dilum Bandara3.1K views
Message and Stream Oriented Communication by Dilum Bandara
Message and Stream Oriented CommunicationMessage and Stream Oriented Communication
Message and Stream Oriented Communication
Dilum Bandara17.9K views
CAP Theorem and Split Brain Syndrome by Dilum Bandara
CAP Theorem and Split Brain SyndromeCAP Theorem and Split Brain Syndrome
CAP Theorem and Split Brain Syndrome
Dilum Bandara1.1K views
Communication in Distributed Systems by Dilum Bandara
Communication in Distributed SystemsCommunication in Distributed Systems
Communication in Distributed Systems
Dilum Bandara933 views
02 - Topologies of Distributed Systems by Dilum Bandara
02 - Topologies of Distributed Systems02 - Topologies of Distributed Systems
02 - Topologies of Distributed Systems
Dilum Bandara3.1K views
01 - Introduction to Distributed Systems by Dilum Bandara
01 - Introduction to Distributed Systems01 - Introduction to Distributed Systems
01 - Introduction to Distributed Systems
Dilum Bandara1.2K views
Use of Technology in Toll Collection & Management by Dilum Bandara
Use of Technology in Toll Collection & ManagementUse of Technology in Toll Collection & Management
Use of Technology in Toll Collection & Management
Dilum Bandara578 views

Recently uploaded

The Future of Micro-credentials: Is Small Really Beautiful? by
The Future of Micro-credentials:  Is Small Really Beautiful?The Future of Micro-credentials:  Is Small Really Beautiful?
The Future of Micro-credentials: Is Small Really Beautiful?Mark Brown
75 views35 slides
MIXING OF PHARMACEUTICALS.pptx by
MIXING OF PHARMACEUTICALS.pptxMIXING OF PHARMACEUTICALS.pptx
MIXING OF PHARMACEUTICALS.pptxAnupkumar Sharma
121 views35 slides
NodeJS and ExpressJS.pdf by
NodeJS and ExpressJS.pdfNodeJS and ExpressJS.pdf
NodeJS and ExpressJS.pdfArthyR3
48 views17 slides
Collective Bargaining and Understanding a Teacher Contract(16793704.1).pptx by
Collective Bargaining and Understanding a Teacher Contract(16793704.1).pptxCollective Bargaining and Understanding a Teacher Contract(16793704.1).pptx
Collective Bargaining and Understanding a Teacher Contract(16793704.1).pptxCenter for Integrated Training & Education
106 views57 slides
STRATEGIC MANAGEMENT MODULE 1_UNIT1 _UNIT2.pdf by
STRATEGIC MANAGEMENT MODULE 1_UNIT1 _UNIT2.pdfSTRATEGIC MANAGEMENT MODULE 1_UNIT1 _UNIT2.pdf
STRATEGIC MANAGEMENT MODULE 1_UNIT1 _UNIT2.pdfDr Vijay Vishwakarma
130 views68 slides
Narration lesson plan by
Narration lesson planNarration lesson plan
Narration lesson planTARIQ KHAN
75 views11 slides

Recently uploaded(20)

The Future of Micro-credentials: Is Small Really Beautiful? by Mark Brown
The Future of Micro-credentials:  Is Small Really Beautiful?The Future of Micro-credentials:  Is Small Really Beautiful?
The Future of Micro-credentials: Is Small Really Beautiful?
Mark Brown75 views
NodeJS and ExpressJS.pdf by ArthyR3
NodeJS and ExpressJS.pdfNodeJS and ExpressJS.pdf
NodeJS and ExpressJS.pdf
ArthyR348 views
Narration lesson plan by TARIQ KHAN
Narration lesson planNarration lesson plan
Narration lesson plan
TARIQ KHAN75 views
12.5.23 Poverty and Precarity.pptx by mary850239
12.5.23 Poverty and Precarity.pptx12.5.23 Poverty and Precarity.pptx
12.5.23 Poverty and Precarity.pptx
mary850239381 views
JQUERY.pdf by ArthyR3
JQUERY.pdfJQUERY.pdf
JQUERY.pdf
ArthyR3105 views
Creative Restart 2023: Leonard Savage - The Permanent Brief: Unearthing unobv... by Taste
Creative Restart 2023: Leonard Savage - The Permanent Brief: Unearthing unobv...Creative Restart 2023: Leonard Savage - The Permanent Brief: Unearthing unobv...
Creative Restart 2023: Leonard Savage - The Permanent Brief: Unearthing unobv...
Taste55 views
Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37 by MysoreMuleSoftMeetup
Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37
Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37
INT-244 Topic 6b Confucianism by S Meyer
INT-244 Topic 6b ConfucianismINT-244 Topic 6b Confucianism
INT-244 Topic 6b Confucianism
S Meyer45 views
Class 9 lesson plans by TARIQ KHAN
Class 9 lesson plansClass 9 lesson plans
Class 9 lesson plans
TARIQ KHAN82 views

Digital Logic

  • 1. Digital Logic CS2052 Computer Architecture Computer Science & Engineering University of Moratuwa Dilum Bandara Dilum.Bandara@uom.lk
  • 2. Outline  Logic gates  Boolean Algebra  Kanaugh Maps 2
  • 3. Logic Gates  Every digital device is based on a set of chips designed to store & process information  Basic building blocks of these chips are logic gates  Implementation of gates can be different  Different materials & fabrication technologies  Different operating voltages  e.g., 5v vs. 0v, 3+v vs. 0.5v  Today, they go as low as 1.9 - 2.1v  But their logical behavior is consistent across all computers 3
  • 4. Common Logic Gates  NOT/inverter  AND 4 Truth table Algebraic function
  • 5. Common Logic Gates (Cont.)  OR  NAND 5
  • 6. Common Logic Gates (Cont.)  NOR  XOR/EXOR (Exclusive OR) 6
  • 7. Common Logic Gates (Cont.)  NXOR/EXNOR (Exclusive NOR) 7
  • 8. Exercise  Implement 3-input AND using 2-inputs ANDs  Implement a NOT gate using a NAND 8
  • 9. Fundamental Logic Gate  2-input NAND gate can be used to build any other gate 9
  • 10. Exercise  Implement AND using NANDs  Homework  Implement following gates using NANDs  OR  XOR 10
  • 11. Boolean Algebra  Boolean variable  Takes only 2 values – either TRUE (1) or FALSE (0)  Boolean function  Mapping from Boolean variables to a Boolean value  Application  Can represent complex relationships in a digital circuit  Boolean algebra  Deals with binary variables & logic operations operating on those variables  Application  Can simplify a relationship among multiple inputs in a digital circuit 11
  • 12. Basic Identities of Boolean Algebra  Basic operations  AND (.), OR (+), NOT (– or /)  0 – FALSE  1 – TRUE x + 0 = x x + x = x x · 0 = 0 x . x = x x + 1 = 1 x + x/ = 1 x · 1 = x x · x / = 0 12
  • 13. Basic Identities (Cont.)  Commutativity x + y = y + x xy = yx  Associativity x + ( y + z ) = ( x + y ) + z x (yz) = (xy) z  Distributivity x ( y + z ) = xy + xz x + yz = ( x + y )( x + z) 13 Textbook has a typo
  • 14. Basic Identities (Cont.)  DeMorgan’s Theorem ( x + y )/ = x/ y/ ( xy )/ = x/ + y/  Generalized DeMorgan's Theorem (a + b + … z) / = a / b / … z / (a.b … z) / = a / + b / + … z /  Involution (x /) / = x 14
  • 15. Exercise  Simplify following functions using Boolean Algebra  a + ab  a(a + b)  a(a / + b)  a + a/ b  (a + b.c) / a + ab = a(1+b)=a a(a + b) = a.a +ab=a+ab=a(1+b)=a a + a'b = (a + a')(a + b)=1(a + b) =a+b a(a' + b) = a.a' +ab=0+ab=ab (a + b.c)' = a'.b' + a'.c' 15
  • 16. Homework  Show steps for following simplifications  (a + b)(a + b') = a  ab + ab'c = ab + ac  (a + b)(a + b' + c) = a + bc  (a(b + z(x + a')))' = a' + b' (z' + x')  (a(b + c) + a'b)'=b'(a' + c')  (a + b)(a' + c)(b + c) = (a + b)(a' + c)  No need to submit answers 16
  • 17. Minterms  Minterm  Each combination of variables in a truth table  As no of digital inputs (Boolean variables) increase no of minterms increase  2n minterms for n inputs  As n increases  Large truth tables  Long Boolean functions  Easier to represent using decimal equivalent of sum of minterms  F(a, b, c) = Σ (2, 4, 5, 7) 17
  • 18. Exercise  Represent all odd numbers between 0 – 7 as a sum of minterms  F(a, b, c) = Σ (1, 3, 5, 7)  Use Boolean Algebra to simplify above function Σ (1, 3, 5, 7) = a‘b‘c + a‘bc + ab‘c + abc = a‘c(b‘ + b) + ac (b‘ + b) = a‘c + ac = c (a‘+ a) = c 18 Sum of Products
  • 19. Karnaugh Map (K-Map)  Pictorial representation of a truth table  Map of squares – each square for each minterm  Adjacent squares change in minterm only by one variable 19 bc a 00 01 11 10 0 0 1 3 2 1 4 5 7 6 Decimal equivalent of minterm
  • 20. Example – 3 Variable K-Map  Simplify represent of all odd numbers between 0 – 7  F(a, b, c) = Σ (1, 3, 5, 7) 20 ab c 00 01 11 10 0 1 1 1 1 1 0 0 0 0 = c
  • 21. Exercise – 3 Variable K-Map  Simplify following expression using a K-map 21 ab c 00 01 11 10 0 1 1 0 0 0 1 1 0 0 = a’c’ + a’b’
  • 22. Kanaugh Map – Simplification  Squares containing 1’s are grouped to get sum- of-product expression  Group size must be 2n  Group must be in rectangular shape  Each group represents an algebraic term  Its OK for groups to overlap  OR of all those terms is the final expression  Maximum group size  better simplification  A don’t care (X) can be interpreted as either 0 or 1 when needed, only if it contributes to simplification  Don’t group Xs together! 22
  • 24. Example – 4 Variable K-Map 24
  • 25. Exercise – 4 Variable K-Map  What would be a Boolean expression of a circuit that detects all even numbers between 0 – 15?  Present as a sum of minterms 25
  • 26. 5 Variable K-Map – Option 1 26 BC DE A 1 /0 00 01 11 10 00 01 11 10 0 5 3 1 8124 2 20 11 106 7 14 16 13 9 15 19 18 17 28 24 31 2921 23 3022 26 25 27
  • 27. Example – 5 Variable K-Map  What would be a Boolean expression of a circuit to detect all prime numbers between 0 & 31? 27 BC DE A 1 /0 00 01 11 10 00 01 11 10 0 5 3 1 8124 2 20 11 106 7 14 16 13 9 15 19 18 17 28 24 31 2921 23 3022 26 25 27
  • 28. 5 Variable K-Map – Option 2 28
  • 29. Example – 5 Variable K-Map – Option 2 29
  • 31. Simplification as Product of Sum  Some times it is useful to obtain the algebraic expression as a product of sums  Can be obtained by finding sum of products for F/ & converting it to F  To find F/ Group 0s in a K-map  F(a, b, c) = Σ (1, 3, 5, 7) = Π (1, 3, 5, 7) 31
  • 32. Exercise – Product of Sum  Find sum-of-product & product-of-sum representation of following K-map 32 ab c 00 01 11 10 0 1 1 x 1 1 0 0 0 1 F(a, b, c) = ab’ + c F/(a, b, c) = a’c’ + bc’ (F/(a, b, c)) / = (a + c)(b’ + c) = F(a, b, c)

Editor's Notes

  1. ( x + y )( x + z) = x + xz + xy + yz = x(1 + z + y) + yz = x + yz