0% found this document useful (0 votes)
12 views

03 BooleanAlgebra&LogicGates

Uploaded by

kirigo theuri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

03 BooleanAlgebra&LogicGates

Uploaded by

kirigo theuri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

Boolean Algebra and

Logic Gates

EE 200
Digital Logic Circuit Design

Dr. Muhamed Mudawar


King Fahd University of Petroleum and Minerals
Presentation Outline

❖ Boolean Algebra

❖ Boolean Functions and Truth Tables

❖ DeMorgan's Theorem

❖ Algebraic manipulation and expression simplification

❖ Logic gates and logic diagrams

❖ Minterms and Maxterms

❖ Sum-Of-Products and Product-Of-Sums

Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 2
Boolean Algebra
❖ Introduced by George Boole in 1854
❖ A set of two values: B = {0, 1}
❖ Three basic operations: AND, OR, and NOT
❖ The AND operator is denoted by a dot (·)
 𝑥 · 𝑦 or 𝑥𝑦 is read: 𝑥 AND 𝑦

❖ The OR operator is denoted by a plus (+)


 𝑥 + 𝑦 is read: 𝑥 OR 𝑦

❖ The NOT operator is denoted by (') or an overbar (¯).


 𝑥′ or 𝑥 is the complement of 𝑥

❖ Today, Boolean algebra is being used to design digital circuits


Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 3
Postulates of Boolean Algebra
1. Closure: the result of any Boolean operation is in B = {0, 1}

2. Identity element with respect to + is 0: 𝑥 + 0 = 0 + 𝑥 = 𝑥

Identity element with respect to · is 1: 𝑥 · 1 = 1 · 𝑥 = 𝑥

3. Commutative with respect to +: 𝑥 + 𝑦 = 𝑦 + 𝑥

Commutative with respect to ·: 𝑥 · 𝑦 = 𝑦 · 𝑥

4. · is distributive over +: 𝑥 · (𝑦 + 𝑧) = (𝑥 · 𝑦) + (𝑥 · 𝑧)

+ is distributive over ·: 𝑥 + (𝑦 · 𝑧) = (𝑥 + 𝑦) · (𝑥 + 𝑧)

5. For every 𝑥 in B, there exists 𝑥′ in B (called complement of 𝑥)


such that: 𝑥 + 𝑥′ = 1 and 𝑥 · 𝑥′ = 0

Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 4
AND, OR, and NOT Operators
❖ The following tables define 𝑥 · 𝑦, 𝑥 + 𝑦, and 𝑥′
❖ 𝑥 · 𝑦 is the AND operator
❖ 𝑥 + 𝑦 is the OR operator
❖ 𝑥′ is the NOT operator

x y x·y x y x+y x x'


0 0 0 0 0 0 0 1
0 1 0 0 1 1 1 0
1 0 0 1 0 1
1 1 1 1 1 1

Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 5
Boolean Functions
❖ Boolean functions are described by expressions that consist of:
 Boolean variables, such as: 𝑥, 𝑦, etc.
 Boolean constants: 0 and 1
 Boolean operators: AND (·), OR (+), NOT (')
 Parentheses, which can be nested
❖ Example: 𝑓 = 𝑥 𝑦 + 𝑤 ′ 𝑧
 The dot operator is implicit and need not be written
❖ Operator precedence: to avoid ambiguity in expressions
 Expressions within parentheses should be evaluated first
 The NOT (') operator should be evaluated second
 The AND (·) operator should be evaluated third
 The OR (+) operator should be evaluated last
Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 6
Truth Table
❖ A truth table can represent a Boolean function
❖ List all possible combinations of 0's and 1's assigned to variables
❖ If n variables then 2n rows
❖ Example: Truth table for 𝑓 = 𝑥𝑦 ′ + 𝑥 ′ 𝑧
x y z y' xy' x' x'z f = xy'+ x'z
0 0 0 1 0 1 0 0
0 0 1 1 0 1 1 1
0 1 0 0 0 1 0 0
0 1 1 0 0 1 1 1
1 0 0 1 1 0 0 1
1 0 1 1 1 0 0 1
1 1 0 0 0 0 0 0
1 1 1 0 0 0 0 0
Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 7
DeMorgan's Theorem
❖ (𝑥 + 𝑦)′ = 𝑥′ 𝑦′ Can be verified
❖ (𝑥 𝑦)′ = 𝑥′ + 𝑦′ Using a Truth Table

x y x' y' x+y (x+y)' x'y' x y (x y)' x'+ y'


0 0 1 1 0 1 1 0 1 1
0 1 1 0 1 0 0 0 1 1
1 0 0 1 1 0 0 0 1 1
1 1 0 0 1 0 0 1 0 0
Identical Identical

❖ Generalized DeMorgan's Theorem:


❖ 𝑥1 + 𝑥2 + ⋯ + 𝑥𝑛 ′ = 𝑥1′ ∙ 𝑥2′ ∙ ⋯ ∙ 𝑥𝑛′
❖ 𝑥1 ∙ 𝑥2 ∙ ⋯ ∙ 𝑥𝑛 ′
= 𝑥1′ + 𝑥2′ + ⋯ + 𝑥𝑛′
Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 8
Complementing Boolean Functions
❖ What is the complement of 𝑓 = 𝑥′𝑦𝑧′ + 𝑥𝑦′𝑧′ ?

❖ Use DeMorgan's Theorem:

 Complement each variable and constant

 Interchange AND and OR operators

❖ So, what is the complement of 𝑓 = 𝑥 ′ 𝑦𝑧 ′ + 𝑥𝑦 ′ 𝑧 ′ ?

Answer: 𝑓′ = (𝑥 + 𝑦 ′ + 𝑧)(𝑥 ′ + 𝑦 + 𝑧)

❖ Example 2: Complement 𝑔 = (𝑎′ + 𝑏𝑐)𝑑′ + 𝑒

❖ Answer: 𝑔′ = (𝑎(𝑏′ + 𝑐′) + 𝑑)𝑒′

Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 9
Algebraic Manipulation of Expressions
❖ The objective is to acquire skills in manipulating Boolean
expressions, to transform them into simpler form.
using the Demorgan theorem

❖ Example 1: prove 𝑥 + 𝑥𝑦 = 𝑥 (absorption theorem)

❖ Proof: 𝑥 + 𝑥𝑦 = 𝑥 · 1 + 𝑥𝑦 𝑥·1=𝑥
= 𝑥 · (1 + 𝑦) Distributive · over +
=𝑥·1=𝑥 (1 + 𝑦) = 1

❖ Example 2: prove 𝑥 + 𝑥′𝑦 = 𝑥 + 𝑦 (simplification theorem)

❖ Proof: 𝑥 + 𝑥′𝑦 = (𝑥 + 𝑥′)(𝑥 + 𝑦) Distributive + over ·


= 1 · (𝑥 + 𝑦) (𝑥 + 𝑥′) = 1
=𝑥+𝑦
Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 10
Consensus Theorem
❖ Prove that: 𝑥𝑦 + 𝑥′𝑧 + 𝑦𝑧 = 𝑥𝑦 + 𝑥′𝑧 (consensus theorem)
❖ Proof: 𝑥𝑦 + 𝑥 ′ 𝑧 + 𝑦𝑧
= 𝑥𝑦 + 𝑥′𝑧 + 1 · 𝑦𝑧 𝑦𝑧 = 1 · 𝑦𝑧
= 𝑥𝑦 + 𝑥′𝑧 + (𝑥 + 𝑥′)𝑦𝑧 1 = (𝑥 + 𝑥′)
= 𝑥𝑦 + 𝑥′𝑧 + 𝑥𝑦𝑧 + 𝑥′𝑦𝑧 Distributive · over +
= 𝑥𝑦 + 𝑥𝑦𝑧 + 𝑥′𝑧 + 𝑥′𝑦𝑧 Associative commutative +
= 𝑥𝑦 · 1 + 𝑥𝑦𝑧 + 𝑥′𝑧 · 1 + 𝑥′𝑧𝑦 𝑥𝑦 = 𝑥𝑦 · 1, 𝑥 ′ 𝑦𝑧 = 𝑥 ′ 𝑧𝑦
= 𝑥𝑦(1 + 𝑧) + 𝑥′𝑧(1 + 𝑦) Distributive · over +
= 𝑥𝑦 · 1 + 𝑥′𝑧 · 1 1 + 𝑧 = 1, 1 + 𝑦 = 1
= 𝑥𝑦 + 𝑥′𝑧 𝑥𝑦 · 1 = 𝑥𝑦, 𝑥′𝑧 · 1 = 𝑥′𝑧
Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 11
Summary of Boolean Algebra
Property Dual Property
Identity 𝑥+0=𝑥 𝑥·1=𝑥
Complement 𝑥 + 𝑥′ = 1 𝑥 · 𝑥′ = 0
Null 𝑥+1=1 𝑥·0=0
Idempotence 𝑥+𝑥 =𝑥 𝑥·𝑥 =𝑥
Involution (𝑥′)′ = 𝑥
Commutative 𝑥+𝑦 = 𝑦+𝑥 𝑥𝑦 = 𝑦𝑥
Associative (𝑥 + 𝑦) + 𝑧 = 𝑥 + (𝑦 + 𝑧) 𝑥 𝑦 𝑧 = 𝑥 (𝑦 𝑧)
Distributive 𝑥 (𝑦 + 𝑧) = 𝑥𝑦 + 𝑥𝑧 𝑥 + 𝑦𝑧 = (𝑥 + 𝑦)(𝑥 + 𝑧)
Absorption 𝑥 + 𝑥𝑦 = 𝑥 𝑥(𝑥 + 𝑦) = 𝑥
Simplification 𝑥 + 𝑥 ′𝑦 = 𝑥 + 𝑦 𝑥(𝑥′ + 𝑦) = 𝑥𝑦
De Morgan (𝑥 + 𝑦)′ = 𝑥′ 𝑦′ 𝑥𝑦 ′ = 𝑥 ′ + 𝑦′
Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 12
Duality Principle
❖ The dual of a Boolean expression can be obtained by:
 Interchanging AND (·) and OR (+) operators
 Interchanging 0's and 1's

❖ Example: the dual of 𝑥(𝑦 + 𝑧′) is 𝑥 + 𝑦𝑧′


 The complement operator does not change

❖ The properties of Boolean algebra appear in dual pairs


 If a property is proven to be true then its dual is also true

Property Dual Property


Identity 𝑥+0=𝑥 𝑥·1=𝑥
Complement 𝑥 + 𝑥′ = 1 𝑥 · 𝑥′ = 0
Distributive 𝑥 (𝑦 + 𝑧) = 𝑥𝑦 + 𝑥𝑧 𝑥 + 𝑦𝑧 = (𝑥 + 𝑦)(𝑥 + 𝑧)
Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 13
Expression Simplification
❖ Using Boolean algebra to simplify expressions
❖ Expression should contain the smallest number of literals
❖ A literal is a variable that may or may not be complemented
❖ Example: simplify 𝑎𝑏 + 𝑎′𝑐𝑑 + 𝑎′𝑏𝑑 + 𝑎′𝑐𝑑′ + 𝑎𝑏𝑐𝑑
❖ Solution: 𝑎𝑏 + 𝑎′𝑐𝑑 + 𝑎′𝑏𝑑 + 𝑎′𝑐𝑑′ + 𝑎𝑏𝑐𝑑 (15 literals)
= 𝑎𝑏 + 𝑎𝑏𝑐𝑑 + 𝑎′𝑐𝑑 + 𝑎′𝑐𝑑′ + 𝑎′𝑏𝑑 (15 literals)
= 𝑎𝑏 + 𝑎𝑏(𝑐𝑑) + 𝑎′𝑐(𝑑 + 𝑑′) + 𝑎′𝑏𝑑 (13 literals)
= 𝑎𝑏 + 𝑎′𝑐 + 𝑎′𝑏𝑑 (7 literals)
= 𝑏𝑎 + 𝑏𝑎′𝑑 + 𝑎′𝑐 (7 literals)
= 𝑏(𝑎 + 𝑎′𝑑) + 𝑎′𝑐 (6 literals)
= 𝑏(𝑎 + 𝑑) + 𝑎′𝑐 (5 literals only)
Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 14
Importance of Boolean Algebra
❖ Our objective is to learn how to design digital circuits

❖ These circuits use signals with two possible values

❖ Logic 0 is a low voltage signal (around 0 volts)

❖ Logic 1 is a high voltage signal (e.g. 5 or 3.3 volts)

❖ The physical value of a signal is the actual voltage it carries,


while its logic value is either 0 (low) or 1 (high)

❖ Having only two logic values (0 and 1) simplifies the


implementation of the digital circuit

Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 15
Next . . .

❖ Boolean Algebra

❖ Boolean Functions and Truth Tables

❖ DeMorgan's Theorem

❖ Algebraic manipulation and expression simplification

❖ Logic gates and logic diagrams

❖ Minterms and Maxterms

❖ Sum-Of-Products and Product-Of-Sums

Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 16
Logic Gates and Symbols
𝑥 𝑥
𝑥·𝑦 𝑥+𝑦 𝑥 𝑥′
𝑦 𝑦
AND gate OR gate NOT gate (inverter)
𝑥
𝑥 𝑦 𝑥′
𝑦

AND: Switches in series OR: Switches in parallel NOT: Switch is normally


logic 0 is open switch logic 0 is open switch closed when x is 0

❖ In the earliest computers, relays were used as mechanical


switches controlled by electricity (coils)
❖ Today, tiny transistors are used as electronic switches that
implement the logic gates (CMOS technology)
Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 17
Truth Table and Logic Diagram
❖ Given the following logic function: 𝑓 = 𝑥(𝑦′ + 𝑧)
❖ Draw the corresponding truth table and logic diagram

Truth Table Logic Diagram


x y z y'+ z f = x(y'+ z) 𝑥
𝑓 = 𝑥(𝑦 ′ + 𝑧)
0 0 0 1 0
𝑦
0 0 1 1 0
𝑧
0 1 0 0 0
0 1 1 1 0 Truth Table and Logic Diagram
1 0 0 1 1 describe the same function 𝑓.
Truth table is unique, but logic
1 0 1 1 1
expression and logic diagram
1 1 0 0 0 are not. This gives flexibility in
1 1 1 1 1 implementing logic functions.
Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 18
Combinational Circuit
❖ A combinational circuit is a block of logic gates having:

𝑛 inputs: 𝑥1, 𝑥2, … , 𝑥𝑛

𝑚 outputs: 𝑓1, 𝑓2, … , 𝑓𝑚

❖ Each output is a function of the input variables

❖ Each output is determined from present combination of inputs

❖ Combination circuit performs operation specified by logic gates

Combinational
𝑛 inputs 𝑚 outputs


Circuit

Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 19
Example of a Simple Combinational Circuit
𝑥
𝑦 𝑓

❖ The above circuit has:


 Three inputs: 𝑥, 𝑦, and 𝑧
 Two outputs: 𝑓 and 𝑔

❖ What are the logic expressions of 𝑓 and 𝑔 ?


❖ Answer: 𝑓 = 𝑥𝑦 + 𝑧′
𝑔 = 𝑥𝑦 + 𝑦𝑧
Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 20
From Truth Tables to Gate Implementation
❖ Given the truth table of a Boolean function 𝑓, how do we
implement the truth table using logic gates?

Truth Table
x y z f
0 0 0 0
What is the logic expression of 𝑓?
0 0 1 0
0 1 0 1
0 1 1 1 What is the gate implementation of 𝑓?
1 0 0 0
1 0 1 1 To answer these questions, we need
1 1 0 0
to define Minterms and Maxterms
1 1 1 1

Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 21
Minterms and Maxterms
❖ Minterms are AND terms with every variable present in either
true or complement form
❖ Maxterms are OR terms with every variable present in either
true or complement form
Minterms and Maxterms for 2 variables 𝑥 and 𝑦
x y index Minterm Maxterm
0 0 0 𝑚0 = 𝑥′𝑦′ 𝑀0 = 𝑥 + 𝑦
0 1 1 𝑚1 = 𝑥′𝑦 𝑀1 = 𝑥 + 𝑦′
1 0 2 𝑚2 = 𝑥𝑦′ 𝑀2 = 𝑥′ + 𝑦
1 1 3 𝑚3 = 𝑥𝑦 𝑀3 = 𝑥′ + 𝑦′

❖ For n variables, there are 2n Minterms and Maxterms


Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 22
Minterms and Maxterms for 3 Variables
x y z index Minterm Maxterm
0 0 0 0 𝑚0 = 𝑥 ′ 𝑦 ′ 𝑧′ 𝑀0 = 𝑥 + 𝑦 + 𝑧
0 0 1 1 𝑚1 = 𝑥 ′ 𝑦 ′ 𝑧 𝑀1 = 𝑥 + 𝑦 + 𝑧′
0 1 0 2 𝑚2 = 𝑥′𝑦𝑧′ 𝑀2 = 𝑥 + 𝑦′ + 𝑧
0 1 1 3 𝑚3 = 𝑥′𝑦𝑧 𝑀3 = 𝑥 + 𝑦 ′ + 𝑧′
1 0 0 4 𝑚4 = 𝑥𝑦 ′ 𝑧′ 𝑀4 = 𝑥′ + 𝑦 + 𝑧
1 0 1 5 𝑚5 = 𝑥𝑦 ′ 𝑧 𝑀5 = 𝑥′ + 𝑦 + 𝑧′
1 1 0 6 𝑚6 = 𝑥𝑦𝑧′ 𝑀6 = 𝑥′ + 𝑦′ + 𝑧
1 1 1 7 𝑚7 = 𝑥𝑦𝑧 𝑀7 = 𝑥′ + 𝑦 ′ + 𝑧′

Maxterm 𝑀𝑖 is the complement of Minterm 𝑚𝑖


𝑀𝑖 = 𝑚𝑖′ and 𝑚𝑖 = 𝑀𝑖′

Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 23
Purpose of the Index
❖ Minterms and Maxterms are designated with an index

❖ The index for the Minterm or Maxterm, expressed as a


binary number, is used to determine whether the variable
is shown in the true or complemented form

❖ For Minterms:
 ‘1’ means the variable is Not Complemented

 ‘0’ means the variable is Complemented

❖ For Maxterms:
 ‘0’ means the variable is Not Complemented

 ‘1’ means the variable is Complemented


Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 24
Sum-Of-Minterms (SOM) Canonical Form
Truth Table
x y z f Minterm
Sum of Minterm entries
0 0 0 0
0 0 1 0
that evaluate to ‘1’
0 1 0 1 𝑚2 = 𝑥′𝑦𝑧′
Focus on the ‘1’ entries
0 1 1 1 𝑚3 = 𝑥′𝑦𝑧
1 0 0 0
𝑓 = 𝑚2 + 𝑚3 + 𝑚5 + 𝑚7
1 0 1 1 𝑚5 = 𝑥𝑦′𝑧
1 1 0 0
𝑓 = ෍ 2, 3, 5, 7
1 1 1 1 𝑚7 = 𝑥𝑦𝑧

𝑓 = 𝑥 ′ 𝑦𝑧 ′ + 𝑥 ′ 𝑦𝑧 + 𝑥𝑦 ′ 𝑧 + 𝑥𝑦𝑧
Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 25
Examples of Sum-Of-Minterms

❖ 𝑓 𝑎, 𝑏, 𝑐, 𝑑 = σ(2, 3, 6, 10, 11)

❖ 𝑓 𝑎, 𝑏, 𝑐, 𝑑 = 𝑚2 + 𝑚3 + 𝑚6 + 𝑚10 + 𝑚11

❖ 𝑓 𝑎, 𝑏, 𝑐, 𝑑 = 𝑎′ 𝑏 ′ 𝑐𝑑′ + 𝑎′ 𝑏 ′ 𝑐𝑑 + 𝑎′𝑏𝑐𝑑′ + 𝑎𝑏′𝑐𝑑′ + 𝑎𝑏′𝑐𝑑

❖ 𝑔 𝑎, 𝑏, 𝑐, 𝑑 = σ(0, 1, 12, 15)

❖ 𝑔 𝑎, 𝑏, 𝑐, 𝑑 = 𝑚0 + 𝑚1 + 𝑚12 + 𝑚15

❖ 𝑔 𝑎, 𝑏, 𝑐, 𝑑 = 𝑎′ 𝑏 ′ 𝑐′𝑑′ + 𝑎′ 𝑏 ′ 𝑐′𝑑 + 𝑎𝑏𝑐′𝑑′ + 𝑎𝑏𝑐𝑑

Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 26
Product-Of-Maxterms (POM) Canonical Form
Truth Table
x y z f Maxterm
Product of Maxterm entries
0 0 0 0 𝑀0 = 𝑥 + 𝑦 + 𝑧
0 0 1 0 𝑀1 = 𝑥 + 𝑦 + 𝑧′
that evaluate to ‘0’
0 1 0 1
Focus on the ‘0’ entries
0 1 1 1
1 0 0 0 𝑀4 = 𝑥′ + 𝑦 + 𝑧
𝑓 = 𝑀0 · 𝑀1 · 𝑀4 · 𝑀6
1 0 1 1
1 1 0 0 𝑀6 = 𝑥′ + 𝑦′ + 𝑧
𝑓 = ෑ 0, 1, 4, 6
1 1 1 1

𝑓 = (𝑥 + 𝑦 + 𝑧)(𝑥 + 𝑦 + 𝑧 ′ )(𝑥 ′ + 𝑦 + 𝑧)(𝑥 ′ + 𝑦 ′ + 𝑧)


Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 27
Examples of Product-Of-Maxterms

❖ 𝑓 𝑎, 𝑏, 𝑐, 𝑑 = ς(1, 3, 11)

❖ 𝑓(𝑎, 𝑏, 𝑐, 𝑑) = 𝑀1 ∙ 𝑀3 ∙ 𝑀11

❖ 𝑓(𝑎, 𝑏, 𝑐, 𝑑) = 𝑎 + 𝑏 + 𝑐 + 𝑑′ 𝑎 + 𝑏 + 𝑐 ′ + 𝑑′ (𝑎′ + 𝑏 + 𝑐 ′ + 𝑑′ )

❖ 𝑔 𝑎, 𝑏, 𝑐, 𝑑 = ς(0, 5, 13)

❖ 𝑔(𝑎, 𝑏, 𝑐, 𝑑) = 𝑀0 ∙ 𝑀5 ∙ 𝑀13

❖ 𝑓(𝑎, 𝑏, 𝑐, 𝑑) = 𝑎 + 𝑏 + 𝑐 + 𝑑 𝑎 + 𝑏 ′ + 𝑐 + 𝑑′ (𝑎′ + 𝑏′ + 𝑐 + 𝑑′ )

Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 28
Conversions between Canonical Forms
❖ The same Boolean function 𝑓 can be expressed in two ways:
 Sum-of-Minterms 𝑓 = 𝑚0 + 𝑚2 + 𝑚3 + 𝑚5 + 𝑚7 = σ(0, 2, 3, 5, 7)
 Product-of-Maxterms 𝑓 = 𝑀1 ∙ 𝑀4 ∙ 𝑀6 = ς(1, 4, 6)

Truth Table
x y z f Minterms Maxterms
0 0 0 1 𝑚0 = 𝑥 ′ 𝑦′𝑧′
0 0 1 0 𝑀1 = 𝑥 + 𝑦 + 𝑧′ To convert from one canonical
0 1 0 1 𝑚2 = 𝑥 ′ 𝑦𝑧′ form to another, interchange
0 1 1 1 𝑚3 = 𝑥 ′ 𝑦𝑧
the symbols  and  and list
1 0 0 0 𝑀4 = 𝑥′ + 𝑦 + 𝑧
those numbers missing from
1 0 1 1 𝑚5 = 𝑥𝑦′𝑧
1 1 0 0 𝑀6 = 𝑥′ + 𝑦′ + 𝑧 the original form.
1 1 1 1 𝑚7 = 𝑥𝑦𝑧
Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 29
Function Complement
Truth Table Given a Boolean function 𝑓

x y z f f' 𝑓(𝑥, 𝑦, 𝑧) = ෍ 0, 2, 3, 5, 7 = ෑ(1, 4, 6)


0 0 0 1 0
0 0 1 0 1 Then, the complement 𝑓′ of function 𝑓
0 1 0 1 0
𝑓′(𝑥, 𝑦, 𝑧) = ෑ 0, 2, 3, 5, 7 = ෍(1, 4, 6)
0 1 1 1 0
1 0 0 0 1
The complement of a function expressed by a
1 0 1 1 0
Sum of Minterms is the Product of Maxterms
1 1 0 0 1
with the same indices. Interchange the symbols
1 1 1 1 0
 and , but keep the same list of indices.

Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 30
Summary of Minterms and Maxterms
❖ There are 2n Minterms and Maxterms for Boolean functions with
n variables, indexed from 0 to 2n – 1

❖ Minterms correspond to the 1-entries of the function

❖ Maxterms correspond to the 0-entries of the function

❖ Any Boolean function can be expressed as a Sum-of-Minterms


and as a Product-of-Maxterms

❖ For a Boolean function, given the list of Minterm indices one can
determine the list of Maxterms indices (and vice versa)

❖ The complement of a Sum-of-Minterms is a Product-of-Maxterms


with the same indices (and vice versa)
Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 31
Sum-of-Products and Products-of-Sums
❖ Canonical forms contain a larger number of literals
 Because the Minterms (and Maxterms) must contain, by definition, all
the variables either complemented or not

❖ Another way to express Boolean functions is in standard form


❖ Two standard forms: Sum-of-Products and Product-of -Sums
❖ Sum of Products (SOP)
 Boolean expression is the ORing (sum) of AND terms (products)
 Examples: 𝑓1 = 𝑥𝑦′ + 𝑥𝑧 𝑓2 = 𝑦 + 𝑥𝑦′𝑧

❖ Products of Sums (POS)


 Boolean expression is the ANDing (product) of OR terms (sums)
 Examples: 𝑓3 = (𝑥 + 𝑧)(𝑥′ + 𝑦′) 𝑓4 = 𝑥(𝑥′ + 𝑦′ + 𝑧)
Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 32
Two-Level Gate Implementation
𝑓1 = 𝑥𝑦′ + 𝑥𝑧 𝑓2 = 𝑦 + 𝑥𝑦′𝑧
𝑥 𝑦
𝑦′
𝑓1 𝑓2
𝑥
𝑥 𝑦′
𝑧 AND-OR 𝑧 3-input AND gate
implementations

𝑓3 = (𝑥 + 𝑧)(𝑥 ′ + 𝑦 ′ ) 𝑓4 = 𝑥(𝑥 ′ + 𝑦 ′ + 𝑧)
𝑥 𝑥
𝑧
𝑓3 𝑓4
𝑥′
𝑥′ 𝑦′
𝑦′ OR-AND 𝑧 3-input OR gate
implementations

Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 33
Two-Level vs. Three-Level Implementation
❖ ℎ = 𝑎𝑏 + 𝑐𝑑 + 𝑐𝑒 (6 literals) is a sum-of-products
❖ ℎ may also be written as: ℎ = 𝑎𝑏 + 𝑐(𝑑 + 𝑒) (5 literals)
❖ However, ℎ = 𝑎𝑏 + 𝑐(𝑑 + 𝑒) is a non-standard form
 ℎ = 𝑎𝑏 + 𝑐(𝑑 + 𝑒) is not a sum-of-products nor a product-of-sums

2-level implementation 3-level implementation


ℎ = 𝑎𝑏 + 𝑐𝑑 + 𝑐𝑒 ℎ = 𝑎𝑏 + 𝑐(𝑑 + 𝑒)
𝑎
𝑏 𝑎
𝑏
𝑐
𝑑 ℎ 𝑐 ℎ
𝑑
𝑐 𝑒
𝑒 3-input OR gate

Boolean Algebra and Logic Gates EE 200 – Digital Logic Circuit Design © Muhamed Mudawar – slide 34

You might also like