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

Lecture1wp BooleanAlg

The document discusses Boolean algebra operations like AND, OR, NAND, and NOR and their truth tables. It also covers basic axioms of Boolean algebra and how to simplify functions using those axioms. Examples are given of logic circuits and incompletely specified functions.

Uploaded by

hyunyoung256
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Lecture1wp BooleanAlg

The document discusses Boolean algebra operations like AND, OR, NAND, and NOR and their truth tables. It also covers basic axioms of Boolean algebra and how to simplify functions using those axioms. Examples are given of logic circuits and incompletely specified functions.

Uploaded by

hyunyoung256
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 63

Digital Design - Computer

Architecture
디지털 설계 - 컴퓨터구조
Boolean Algebra
Lecture 1

Brian J. d’Auriol
2023

Lecture Notes developed by Brian J. d’Auriol, permission to use material granted for non-profit, academic use, provided credit is explicitly given; all other use must request prior permission from the author.
Use Permissions
• Lecture Notes developed by Brian J. d’Auriol, permission to use
material granted for non-profit, academic use, provided credit is
explicitly given; all other use must request prior permission from the
author.

• Presentation may contain additional copyrighted images used herein


for purposes of academic teaching; all such copyrighted material
retains the original copyright terms.

Slide 2
Boolean Algebra Operations
x F(x)
For one input 0 0 0 1 1 each of its possible values, 0 and 1,
binary variable, x, 1 0 1 0 1 can have an output of 0 or 1
There are four
possible operations

Of these operations, only the operation


that reverses the input is highly useful Two common notations are the
prime, x’ , and overbar x
NOT x F(x)
0 1 x F = x’ F=x
1 0

Diagram, truth table and function


are three exchangeable specification formats.

Slide 3
Boolean Algebra Operations
There are 16 possible operations for two binary variables, of these, the
following are most useful

x1 x2 F(x1,x2)
0 0 0
AND 0 1 0
x1
x2 F(x1,x2) = x1 x2
1 0 0
1 1 1
x1 x2 F(x1,x2)
0 0 0
OR 0 1 1
x1
x2 F(x1,x2) = x1 + x2
1 0 1
1 1 1
x1 x2 F
0 0 0
XOR 0 1 1
x1
x2 F = x1 x2
1 0 1
1 1 0

Slide 4
Boolean Algebra Operations
AND NAND
x1 x2 F(x1,x2) F(x1,x2)’
0 0 0 1 x1 x1 x2
x2
AND F = (x1 x2)’
0 1 0 1
1 0 0 1
equivalent
1 1 1 0
x1
x2 F = (x1’ + x2’) = (x1x2)’
(DeMorgan's
Theorem)

x1 x2 F x1
NAND x2 F = (x1 x2)’
0 0 1
0 1 1
NAND 1 0 1 x1
1 1 0 x2 F = (x1 x2)’

Slide 5
Summary Boolean Algebra Operations
x1 x2 F x1 x2 F
0 0 0 NAND 0 0 1
AND 0 1 0 F = x1 x2 0 1 1 F = (x1 x2)’
1 0 0 1 0 1
1 1 1 NAND 1 1 0

x1 x2 F x1 x2 F
0 0 0 0 0 1
NOR
OR 0 1 1 F = x1 + x2 0 1 0 F = (x1 + x2)’
1 0 1 1 0 0
1 1 1 NOR 1 1 0 x F
NOT
0 1
x1 x2 F x1 x2 F 1 0
0 0 0 0 0 1
XOR 0 1 1 F = x1 x2 E-XOR 0 1 0 F = (x1 x2)’ F = x’
1 0 1 1 0 0 F=x
1 1 0 1 1 1

Slide 6
3 input NAND Gate
Fairchild Semidonductor
DM74LS10
Triple 3-Input NAND Gate
August 1986
Revised March 2000

Slide 7
Logic Circuits
a (a b) (a b) + c’
F(a,b,c) b ((a b) + c’) b

c c’ a b c F
0 0 0 0
0 0 1 0
0 1 0 1
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 1

Slide 8
Logic Circuits
a (a b) (a b) + c’
F(a,b,c) b F=((a b) + c’) b
c c’ a b c F
0 0 0 0
0 0 1 0
a'bc' 0 1 0 1
0 1 1 0
a a’ or 1 0 0 0
b b 1 0 1 0
c c’
or abc' 1 1 0 1
a abc 1 1 1 1
b F=a'bc' + abc' + abc
c’
= Σ(2,6,7)
a
b
c
Different circuits result in same function, which circuits are better (class discussion)?

Slide 9
Basic Axioms Based on AND, OR, NOT operations (i.e. of the
20 available operations, these three are used)

1. x+0=x 11. x + (y + z) = (x + y) + z
2. x0 = 0 12. x(yz) = (xy)z
3. x+1=1 13. x(y+z) = xy + xz
4. x1 = x 14. x + yz = (x+y)(x+z) (error in book)
5. x+x=x
6. xx = x 15. (x+y)' = x'y'
7. x + x' = 1 DeMorgan's Theorem
16. (xy)' = x'+y‘
8. xx' = 0
9. x+y=y+x
10. xy = yx 17. (x')' = x
Slide 10
Axiom Simplification
Simplify This function Simplify This function
using basic axioms: using basic axioms:
F=((a b) + c’) b
F=a'bc' + abc' + abc
= bab + bc' [13, distribution +]
= b(a'c' + ac' +ac) [13]
= ab + bc' [10,12,6]
= b(a'c' + a(c'+c)) [13]
= b(a+c') [13]
= b(a'c' + a) [7]
Equivalent
expressions = b(a + a'c') [9]
= b( (a+a')(a+c') ) [14]
a = b(a+c') [7]
A
c a
b b
c
Equivalent
circuit C
outputs

B a
b

c
Which circuit is better? Slide 11
Incompletely Specified Functions
a b c F(abc)
0 0 0 0
Definitely not in function
0 0 1 0
a
0 1 0 1 Definitely in function
c
0 1 1 0 b
1 0 0 0 Definitely not in function

1 0 1 0
1 1 0 x Don’t care (can be or not in function)
1 1 1 x

Slide 12
Verilog Simulation
Truth table
a b c F //Verilog sim: Lecture 1, Slide 12 time x2 x1 x0 y0
0 0 0 0 //Brian J. d'Auriol 0 0 0 0 0
0 0 1 0 module circuit1(y, x); 1 0 0 1 0
0 1 0 1 input [7:0] x; output [7:0] y; 2 0 1 0 1
wire w1, w2; 3 0 1 1 0
0 1 1 0
1 0 0 0 4 1 0 0 0
not G1 (w1, x[0:0]);
1 0 1 0 5 1 0 1 0
or G2 (w2, x[2:2], w1);
1 1 0 1 and G3 (y[0:0], w2, x[1:1]); 6 1 1 0 1
1 1 1 1 endmodule 7 1 1 1 1
x[2:2] a w2
x[0:0] c w1 y[0:0]
x[1:1] b
F=((a b + c’) b

Slide 13
Verilog Simulation
Truth table
a b c F //Verilog sim: Lecture 1, Slide 12 time x2 x1 x0 y0
0 0 0 0 //Brian J. d'Auriol 0 0 0 0 0
0 0 1 0 module circuit1(y, x); 1 0 0 1 0
0 1 0 1 input [7:0] x; output [7:0] y; 2 0 1 0 1
wire w1, w2; 3 0 1 1 0
0 1 1 0
output inputs 4 1 0 0 0
1 0 0 0
not G1 (w1, x[0:0]);
1 0 1 0 5 1 0 1 0
or G2 (w2, x[2:2], w1);
1 1 0 1 and G3 (y[0:0], w2, x[1:1]); 6 1 1 0 1
1 1 1 1 endmodule 7 1 1 1 1
x[2:2] a w2
x[0:0] c w1 y[0:0]
x[1:1] b
F=((a b + c’) b
This Verilog simulation uses gate level description.
Gates have predefined function argument ordering: output
followed by inputs.

Slide 14
Verilog Simulation
//Verilog sim: Lecture 1, Slide 12 time x2 x1 x0 y0
//Brian J. d'Auriol 0 0 0 0 0
module circuit1(y, x); 1 0 0 1 0
input [7:0] x; output [7:0] y; 2 0 1 0 1
wire w1, w2; 3 0 1 1 0
output inputs 4 1 0 0 0
not G1 (w1, x[0:0]);
5 1 0 1 0
or G2 (w2, x[2:2], w1);
Require a testbench and G3 (y[0:0], w2, x[1:1]); 6 1 1 0 1
to drive simulation endmodule 7 1 1 1 1
module main();
integer i; for (i=0; i<(2**3); i=i+1)
reg [7:0] x; begin
wire [7:0] y; triggers Variables x = i; integer to binary
circuit1 c1(y, x); circuit1 (signals) #1 ; delay 1 time step
execution change end
initial begin
$display("%4s ", "time x2 x1 x0 y0"); $finish ;
end
$monitor("%4t %2b %2b %2b %2b", endmodule
$time, x[2:2], x[1:1], x[0:0], y[0:0]); generate output whenever var changes Slide 15
Verilog Simulation
code fragment directly time x2 x1 x0 y0
//Verilog sim: Lecture 1, Slide 12
encoding truth table //Brian J. d'Auriol 0 0 0 0 0
module circuit1(y, x); 1 0 0 1 0
always @(*) begin input [7:0] x; output [7:0] y; 2 0 1 0 1
case(x) wire w1, w2; 3 0 1 1 0
2,6,7: y[0:0] = 1'b1; output inputs 4 1 0 0 0
not G1 (w1, x[0:0]);
default: y[0:0] = 1'b0; 5 1 0 1 0
or G2 (w2, x[2:2], w1);
endcase and G3 (y[0:0], w2, x[1:1]); 6 1 1 0 1
end endmodule 7 1 1 1 1
module main();
integer i; for (i=0; i<(2**3); i=i+1)
reg [7:0] x; begin
wire [7:0] y; x = i; integer to binary
circuit1 c1(y, x); #1 ; delay 1 time step
end
initial begin
$display("%4s ", "time x2 x1 x0 y0"); $finish ;
end
$monitor("%4t %2b %2b %2b %2b", endmodule
$time, x[2:2], x[1:1], x[0:0], y[0:0]); generate output whenever var changes Slide 16
Complement a function
Use de Morgan's law to complement a function
F = a'b' + a'b + ab' + ab
F'= (a'b' + a'b + ab' + ab)'
= (a'b' + a'b + ab')' (ab)' [15 de Morgan's theorem]
= (a'b')' (a'b)' (ab')' (ab)' [ repeated 15]
= (a''+b'') (a''+b') (a'+b'') (a'+b') [16 de Morgan's theorem]
F'= (a+b)(a+b')(a'+b)(a'+b') [repeated 17]
a b F a+b a+b' a'+b a'+b' F'
0 0 1 0 1 1 1 0
Note that F' is all
0 1 1 1 0 1 1 0 zeros which is the
1 0 1 1 1 0 1 0 correct result
1 1 1 1 1 1 0 0 since F is all ones

a b F F'
0 0 1 0 Sometimes referred
to as 'negative logic'
0 1 0 1
Let F = a'b', then F' = (a+b) or 'off-set' since the
1 0 0 1 complement
function is used.
1 1 0 1
Slide 17
Minterms
For three unknowns: F(a,b,c)
a
Canonical Form: a’b’c’ + a’b’c + a’b c’ + a’bc + ab’c’ + ab’c + abc’ + abc b c ∑
0 0 0 m0
each term is called a minterm 0 0 1 m1
0 1 0 m2
Sum of Products (SoP) 0 1 1 m3
1 0 0 m4
value expression: 000 + 001 + 010 + 011 + 100 + 101 + 110 + 111
1 0 1 m5
1 1 0 m6
Minterm Form: 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 1 1 1 m7
decimal value of the binary value expression for each minterm

Minterm Form: S (0,1,2,3,4,5,6,7)

a’
b’
E.g.F(a,b,c)=S (0,4) c’
a
b’
c’
Slide 18
Minterms
For three unknowns: F(a,b,c)
a
Canonical Form: a’b’c’ + a’b’c + a’b c’ + a’bc + ab’c’ + ab’c + abc’ + abc b c ∑
0 0 0 m0
Note: the order of each variables
term is called a in the function domain 0
minterm 0 1 m1
establishes the bit-ordering in the truth table, and 0 1 0 m2
therefore also the value expression of the
Sum of Products minterm.
(SoP) 0 1 1 m3
1 0 0 m4
value expression: 000 + 001 + 010 + 011 + 100 + 101 + 110 + 111
1 0 1 m5
1 1 0 m6
Minterm Form: 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 1 1 1 m7
decimal value of the binary value expression for each minterm

Minterm Form: S (0,1,2,3,4,5,6,7)

a’
b’
E.g.F(a,b,c)=S (0,4) c’
a
b’
c’
Slide 19
Maxterms
For three unknowns: F(a,b,c)

Canonical Form: (a+b+c)(a+b+c')(a+b'+c)(a+b'+c')(a'+b+c)(a'+b+c')(a'+b'+c)(a'+b'+c')


each term is called a maxterm

Product of Sums (PoS)

value expression: 000 + 001 + 010 + 011 + 100 + 101 + 110 + 111
(of the complement)

Maxterm Form: 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7
decimal value of the binary value expression for each maxterm (note, value of complement)

Maxterm Form: P (0,1,2,3,4,5,6,7)

a’
b’
E.g. F(a,b,c)=P(3,7)c’
a
b’
c’
Slide 20
Simplification Overview
➢Simplification:
➢Basic Axioms
➢By hand, may be practical for very few numbers of unknowns

➢Karnaugh Maps (K-Map)

➢Human oriented,
➢By hand, practical up to about 5 or 6 unknowns,
➢May be automated but not well scalable.

➢Decimal Quine-McClusky Method


➢Automated oriented,
➢Can handle large numbers of unknowns Slide 21
Simplification Algorithms
Axiom 13: x(y+z) = xy + xz where
xy + xy’ = x(y + y’)
Application of Axiom 7: x + x' = 1 eliminates a variable.
Axiom 4: x1 = x

Karnaugh Map (K-map) algorithm:


• Minterms (maxterms) organized into 2D or 3D lattice (geometric) arrangements
– Enables human visual search and pattern recognition of adjacently placed terms
• Often use ‘1’ to mark minterms, ‘0’ to mark maxterms, ‘x’ to mark don’t care terms
• Algorithm consists of a set of visual search rules, followed by human selection analysis to determine essential (i.e.
necessary) and non-essential (but still required) terms.

Quine-McClusky algorithm:
• Minterms organized tables based on number of ‘1’ bits
– Enables automated searching and matching of Axiom 13, followed by Axiom 7 and 4 reductions
• Algorithm consists of different phases: first, Axiom 13, 7, 4 reductions; second, identification of essential (i.e.
necessary) terms; third, identification of best set of non-essential (but still required) terms.
Slide 22
K-map simplification: Ordering
Definition of minterm
F(x0x1) x1 x0 x1 F m0 = x0’ x1’
0 1 0 0
x0
0 m0 m1 0 1 m1 = x0’ x1
1 m2 m3 1 0
1 1 m2 = x0 x1’
m3 = x0 x1

Slide 23
K-map simplification: Ordering
Definition of minterm
F(x0x1) x1 x0 x1 F m0 = x0’ x1’
0 1 0 0 x0’ x1 + x0 x1 = x1 ( x0’ + x0)
x0
0 m0 m1 0 1 m1 = x0’ x1 = x1
1 m2 m3 1 0
1 1 m2 = x0 x1’
m3 = x0 x1

Slide 24
K-map simplification: Ordering
Definition of minterm
F(x0x1) x1 x0 x1 F m0 = x0’ x1’
0 1 0 0
x0
0 m0 m1 0 1 m1 = x0’ x1
1 m2 m3 1 0
1 1 m2 = x0 x1’
2 variable m3 = x0 x1

F(x0x1) x0 x0 x1 F m0 = x0’ x1’


0 1 0 0
x1
0 m0 m2 0 1 m1 = x0’ x1
1 m1 m3 1 0
1 1 m2 = x0 x1’
If the order of the variables is m3 = x0 x1
changed, then the ordering of the
minterms are also changed.
Slide 25
K-map simplification: Ordering
F(x0x1x2)
x1x2
x0 x1 x2 F m0 = x0’ x1’ x2’
00 01 11 10 0 0 0
x0
0 m0 m1 m3 m2 0 0 1 m1 = x0’ x1’ x2
1 m4 m5 m7 m6 0 1 0
0 1 1 m2 = x0’ x1 x2’
1 0 0
3 variable m3 = x0’ x1 x2
1 0 1
1 1 0
1 1 1

Adjacent squares defined by two minterms that differ in one


variable only: first column with last column, first row with
last row. E.g., m0 is adjacent with m2

Slide 26
K-map simplification: Adjacency
F(x1,x2) F(x1,x2,x3) Note, the F(x1,x2,x3,x4)
ordering of
the minterm
x3,x4
x2 x2,x3 00 01 11 10
0 1 00 01 11 10 00 m0 m1 m3 m2
0 m0 m1 0 m0 m1 m3 m2 01 m4 m5 m7 m6
x1 x1 x1,x2
1 m2 m3 1 m4 m5 m7 m6 11 m12 m13 m15 m14
10 m8 m9 m11 m10

3 variable (extend 4 variable (extend down


2 variable right from 2 variable) from 3 variable)

5 variable: extend right from 4 variable) 6 variable: extend down from 5 variable)

Each adjacent square differs in only the complement of a single variable


e.g. F(x1,x2,x3,x4): m5 has value 0101 corresponding with x1' x2 x3' x4
m7 has value 0111 corresponding with x1' x2 x3 x4

f = (x1' x2 x3' x4) + (x1' x2 x3 x4) = x1' x2 x4( x3' + x3) = x1' x2 x4

Equals 1 which can be


eliminated from the expression
Slide 27
K-map simplification: Adjacency
F(x1,x2,x3,x4)
m0 (x1’) combined with
x3,x4
m8 (x1) leaves x2, also
m2 combined with m10
x00 01 11 x 10
x00 m0 m1 m3 m2
01 m4 m5 m7 m6
m0 (x3’) combined with x1,x2
m2 (x3) leaves x4’, also 11 m12 m13 m15 m14
m8 combined with m10 x10 m8 m9 m11 m10

Combine minterms m0, m2, m8 and m16 = x2’x4’

F(x1,x2,x3,x4)
Combine minterms m0,
x3,x4
m1, m2, m3, m8, m9, m10
00 01 11 10
and m11 = x2’
00 m0 m1 m3 m2
Combine minterms m0, 01 m4 m5 m7 m6
m4, m12, m8, m2, m6, m14 11 m12 m13 m15 m14
and m10 = x4’ 10 m8 m9 m11 m10

Slide 28
K-map simplification: Example 1
00 01 11 10
0 m0 m1 m3 m2
1 m4 m5 m7 m6

F(a,b,c) = S (0,2,4,5,6)

bc
00 01 11 10
0 ✓ ✓
a
1 ✓ ✓ ✓

Fs = c' + ab'

Slide 29
K-map simplification: Example 2
00 01 11 10
00 m0 m1 m3 m2
01 m4 m5 m7 m6
11 m12 m13 m15 m14
10 m8 m9 m11 m10

F(a,b,c,d) = S (0,2,4,6,8,13) + D(10,11)

Don’t care terms


cd
00 01 11 10
00 1 1
01 1 1
ab
11 1
10 1 X X

Slide 30
K-map simplification: Example 2
00 01 11 10
00 m0 m1 m3 m2
01 m4 m5 m7 m6
11 m12 m13 m15 m14
10 m8 m9 m11 m10

F(a,b,c,d) = S (0,2,4,6,8,13) + D(10,11)

Don’t care terms


cd
00 01 11 10
00 1 1
01 1 1
ab
11 1
10 1 X X

Fs = b‘d’ + a’d’ + abc’d

Slide 31
K-map simplification: Example 3
00 01 11 10
00 m0 m1 m3 m2
01 m4 m5 m7 m6
11 m12 m13 m15 m14
10 m8 m9 m11 m10

F(a,b,c,d) = S (0, 1, 2, 4, 5, 6, 8, 9, 10, 11, 12, 13, 15)

cd
00 01 11 10
00 1 1 1
01 1 1 1
ab
11 1 1 1
10 1 1 1 1

Slide 32
K-map simplification: Example 3
00 01 11 10
00 m0 m1 m3 m2
01 m4 m5 m7 m6
11 m12 m13 m15 m14
10 m8 m9 m11 m10

F(a,b,c,d) = S (0, 1, 2, 4, 5, 6, 8, 9, 10, 11, 12, 13, 15)

cd
Identify all the largest
00 01 11 10 groupings (prime
00 1 1 1 implicants)
01 1 1 1
ab
11 1 1 1
10 1 1 1 1

Slide 33
K-map simplification: Example 3
00 01 11 10
00 m0 m1 m3 m2
01 m4 m5 m7 m6
11 m12 m13 m15 m14
10 m8 m9 m11 m10

F(a,b,c,d) = S (0, 1, 2, 4, 5, 6, 8, 9, 10, 11, 12, 13, 15)

cd
Identify all the largest
00 01 11 10 groupings (prime
00 1 1 1 implicants)
01 1 1 1 Identify minterms yellow
ab that are covered by
11 1 1 1
exactly one largest
10 1 1 1 1 grouping (essential
prime implicant).

Slide 34
K-map simplification: Example 3
00 01 11 10
00 m0 m1 m3 m2
01 m4 m5 m7 m6
11 m12 m13 m15 m14
10 m8 m9 m11 m10

F(a,b,c,d) = S (0, 1, 2, 4, 5, 6, 8, 9, 10, 11, 12, 13, 15)

cd
Identify all the largest
00 01 11 10 groupings (prime
00 1 1 1 implicants)
01 1 1 1 Identify minterms yellow
ab that are covered by
11 1 1 1 red
exactly one largest
10 1 1 1 1 gray
grouping (essential
prime implicant).

Slide 35
K-map simplification: Example 3
00 01 11 10
00 m0 m1 m3 m2
01 m4 m5 m7 m6
11 m12 m13 m15 m14
10 m8 m9 m11 m10

F(a,b,c,d) = S (0, 1, 2, 4, 5, 6, 8, 9, 10, 11, 12, 13, 15)

cd
Identify all the largest
00 01 11 10 groupings (prime
00 1 1 1 implicants)
01 1 1 1 Identify minterms yellow
ab that are covered by
11 1 1 1 red
exactly one largest
10 1 1 1 1 gray
grouping (essential
prime implicant).
This minterm is
covered in two prime
implicants (blue and
green).

Slide 36
K-map simplification: Example 3
00 01 11 10
00 m0 m1 m3 m2
01 m4 m5 m7 m6
11 m12 m13 m15 m14
10 m8 m9 m11 m10

F(a,b,c,d) = S (0, 1, 2, 4, 5, 6, 8, 9, 10, 11, 12, 13, 15)

cd
Identify all the largest
00 01 11 10 groupings (prime
00 1 1 1 implicants)
01 1 1 1 Identify minterms yellow
ab that are covered by
11 1 1 1 red
exactly one largest
10 1 1 1 1 gray
grouping (essential
prime implicant).
Fs = a’d’+ c’+ ad + ab’ This minterm is
Fs = a’d’+ c’+ ad + b’d’ covered in two prime
implicants (blue and
green).

Slide 37
K-map simplification: Example 3a
00 01 11 10
00 m0 m1 m3 m2
01 m4 m5 m7 m6
11 m12 m13 m15 m14
10 m8 m9 m11 m10

F(a,b,c,d) = S (0,1,2,4,5,6,8,9,10,11,12,13,15)
F’= π (3,7,14)
cd cd
00 01 11 10 00 01 11 10
00 1 1 0 1 00 1 1 0 1
01 1 1 0 1 01 1 1 0 1
ab ab
11 1 1 1 0 11 1 1 1 0
10 1 1 1 1 10 1 1 1 1

Fs = a’d’+ c’+ ad + ab’ F’s = a’cd + abcd’


Fs = (a’cd + abcd’)’
= (a+c’+d’)(a’+b’+c’+d)
Slide 38
K-map simplification: Example 3a
Fs = (a+c’+d’)(a’+b’+c’+d)
= aa’ + ab’ + ac’ + ad +
c’a’ + c’b’ + c’c’ + c’d +
d’a’ + d’b’ + d’c’ + d’d
= ab’ + c’ + ad +a’d’ +b’d’
Now combine b’d’ with a’d’+ab’
= b’d’(a + a’) + a’d’ + ab’ +…
= ab’d’ + a’b’d’ + a’d’ +ab’ + …
= (ab’d’ + ab’) + (a’b’d’ + a’d’) + …
= (ab’(d’+1) + a’d’(b’+1) +…
= ab’ + a’d’ + …
Fs = ab’ + a’d’ + c’ + ad

Slide 39
K-map simplification: Example 4
5-variable kmap:
F=(a,b,c,d,e)

F(a,b,c,d,e) = S (0,1,16,17)

Slide 40
K-map simplification: Example 4
5-variable kmap:
de de
F=(a,b,c,d,e) a=0 00 01 11 10 a=1 00 01 11 10
00 00
01 01
bc
11 11
10 10

F(a,b,c,d,e) = S (0,1,16,17)

Slide 41
K-map simplification: Example 4
5-variable kmap:
de de
F=(a,b,c,d,e) a=0 00 01 11 10 a=1 00 01 11 10
00 m0 m1 m3 m2 00 m16 m17 m19 m18
01 m4 m5 m7 m6 01 m20 m21 m23 m22
bc
11 m12 m13 m15 m14 11 m28 m29 m31 m30
10 m8 m9 m11 m10 10 m24 m25 m27 m26

F(a,b,c,d,e) = S (0,1,16,17)

Note: Other visual organizations for 5-variable k-maps are possible.


Slide 42
K-map simplification: Example 4
5-variable kmap:
de de
F=(a,b,c,d,e) a=0 00 01 11 10 a=1 00 01 11 10
00 m0 m1 m3 m2 00 m16 m17 m19 m18
01 m4 m5 m7 m6 01 m20 m21 m23 m22
bc
11 m12 m13 m15 m14 11 m28 m29 m31 m30
10 m8 m9 m11 m10 10 m24 m25 m27 m26

F(a,b,c,d,e) = S (0,1,16,17)
= b’c’d’

Slide 43
K-map simplification: Example 4
5-variable kmap: de
F=(a,b,c,d,e) a=1 00 01 11 10
00 m16 m17 m19 m18
01 m20 m21 m23 m22
11 m28 m29 m31 m30
10 m24 m25 m27 m26

de
a=0 00 01 11 10
00 m0 m1 m3 m2
01 m4 m5 m7 m6
bc
11 m12 m13 m15 m14
10 m8 m9 m11 m10

F(a,b,c,d,e) = S (0,1,16,17)
= b’c’d’

Slide 44
K-map: Implicants and Example 1
F(a,b,c,d) =
Implicant:
adjacent S (0,1,2,3,4,12)
minterms c,d
with don’t 00 01 11 10
care 00 m0 m1 m3 m2
01 m4
a,b
11 m12
10

Slide 45
K-map: Implicants and Example 1
F(a,b,c,d) =
Implicant:
adjacent S (0,1,2,3,4,12)
minterms c,d
with don’t 00 01 11 10
care 00 m0 m1 m3 m2
01 m4
a,b
11 m12
10
m0,m2
m0,m1
m1,m3
m3,m2
m0,m4
m4,m12
m0,m1,m2,m3

Slide 46
K-map: Implicants and Example 1
F(a,b,c,d) =
Implicant: Prime Implicant
adjacent (PI): an implicant S (0,1,2,3,4,12)
minterms that cannot be c,d
with don’t covered by a larger 00 01 11 10
care implicant 00 m0 m1 m3 m2
01 m4
a,b
11 m12
10
m0,m2
m0,m1
m1,m3
m3,m2
m0,m4 m0,m4
m4,m12 m4,m12
m0,m1,m2,m3 m0,m1,m2,m3

Slide 47
K-map: Implicants and Example 1
F(a,b,c,d) =
Implicant Prime Implicant Essential Prime
(I): adjacent (PI): an implicant Implicant (EPI): a S (0,1,2,3,4,12)
minterms that cannot be PI that contains at c,d
with don’t covered by a larger least one minterm 00 01 11 10
care implicant that cannot be 00 m0 m1 m3 m2
covered by any 01 m4
other PI a,b
11 m12
10
m0,m2 Minimized function: must
m0,m1 include all EPI and sufficient
m1,m3 non-essential PI to cover
m3,m2 remaining minterms
Non-essential prime implicants
m0,m4 m0,m4
m4,m12 m4,m12 m4,m12
m0,m1,m2,m3 m0,m1,m2,m3 m0,m1,m2,m3 F(a,b,c,d) = bc’d’ + a’b’
cannot be
covered by
any other PI

Slide 48
K-map: Implicants Example 2
F(w,x,y,z) = S (0,1,5,10,11,15) + D(7,13)
I: PI: EPI: non-EPI: y,z
m0,m1
00 01 11 10
m1,m5 m0,m1 m0,m1 00 1 1
Marker showing
m5,m7 m1,m5 m1,m5 01 1 X
m5,m13 must w,x minterms that
m5,m7,m13,m15 m5,m7,m13,m15 11 X 1 are covered by
m7,m15
m11,m15 select m11,m15
m13,m15 10 1 1 only one PI.
m5,m7,m13,m15 m10,m11 m10,m11
m11,m15
m10,m11
Minimized function: must
include all EPI and sufficient
Two possible F1(w,x,y,z) = w’x’y’ + wx’y + xz Best Choice non-essential PI to cover
remaining minterms
simplified functions: F2(w,x,y,z) = w’x’y’ + wx’y + w’y’z + wyz

Cost • Minimize number of literals, literals are Boolean variables (complemented or not) in the expression (i.e. total number
of input wires to AND gates)
functions • F1 : 8 literals, F2 : 12 literals
Other cost • Minimize number of product terms (i.e. total number of input wires to OR gate)
functions • F1 : 3 terms, F2 : 4 terms
exist.
Selection
• Ensure that each selected PI included at least one minterm not included in any other selected PI
rule • Minimize overlap among PIs as much as possible
• F1 : 0 overlaps, F2 : 2 overlaps m1,m5 overlaps m0m1 and m11,m15 overlaps m10,m11 Slide 49
K-map: Implicants Example 2
F(w,x,y,z) = S (0,1,5,10,11,15) + D(7,13)
PI: EPI: non-EPI: y,z
00 01 11 10
(0,1) (0,1) 00 1 1
(1,5) (1,5) 01 1 X
(5,7D,13D,15) must (5,7D,13D,15) w,x
select 11 X 1
(11,15) (11,15)
10 1 1
(10,11) (10,11)

Slide 50
K-map: Implicants Example 2
F(w,x,y,z) = S (0,1,5,10,11,15) + D(7,13)
PI: EPI: non-EPI: y,z
00 01 11 10
(0,1) (0,1) 00 1 1
(1,5) (1,5) 01 1 X
(5,7D,13D,15) must (5,7D,13D,15) w,x
select 11 X 1
(11,15) (11,15)
10 1 1
(10,11) (10,11)

EPI = { (0,1),(10,11)} K-map answers for assignment and exam


nEPI = {(1,5), (5,7D,13D,15), (11,15)} 1. PI ordering left-to-right: EPI first then nEPI
F = {(0,1), (10,11), (5,7D,13D,15) }
2. Largest coverage first

F(w,x,y,z) = w’x’y’ + wx’y + xz 3. Same coverage, order by smallest minterm first

A second example
EPI & nEPI 0,1 10,11 5,7,13,15
EPI = { (0,1,2,3),(12,13,14,15,) (24)}
F w'x'y wx'y xz
nEPI = {}
Each PI: comma separated, no spaces, sorted ascending
order, do not identify don’t care minterms EPI & nEPI 0,1,2,3 12,13,14,15 24
F

Slide 51
Quine McCluskey
F(w,x,y,z) = S (0,1,5,10,11,15) + D(7,13)
PI: EPI: non-EPI: y,z
00 01 11 10
(0,1) (0,1) 00 1 1
(1,5) (1,5) 01 1 X
(5,7D,13D,15) must (5,7D,13D,15) w,x
select 11 X 1
(11,15) (11,15)
10 1 1
(10,11) (10,11)

1. Re-organized into Number of ‘1’s minterms I(2) Implicant 2 literals I(4)


tabular format 0 0 0000
(easier for program
1 1 0001
representations)
2 5 0101
10 1010

3 7D 0111
11 1011
13D 1101
4 15 1111
Slide 52
Quine McCluskey
F(w,x,y,z) = S (0,1,5,10,11,15) + D(7,13)
PI: EPI: non-EPI: y,z
00 01 11 10
(0,1) (0,1) 00 1 1
(1,5) (1,5) 01 1 X
(5,7D,13D,15) must (5,7D,13D,15) w,x
select 11 X 1
(11,15) (11,15)
10 1 1
(10,11) (10,11)

1. Re-organized into Number of ‘1’s minterms I(2) Implicant 2 literals I(4)


tabular format 0 0 0000 0,1 000- - represents the
(easier for program variable that has
1 1 0001 combine terms
representations) that differ by one been eliminated
2 5 0101 variable
10 1010

3 7D 0111
11 1011
13D 1101
4 15 1111
Slide 53
Quine McCluskey
F(w,x,y,z) = S (0,1,5,10,11,15) + D(7,13)
PI: EPI: non-EPI: y,z
00 01 11 10
(0,1) (0,1) 00 1 1
(1,5) (1,5) 01 1 X
(5,7D,13D,15) must (5,7D,13D,15) w,x
select 11 X 1
(11,15) (11,15)
10 1 1
(10,11) (10,11)

1. Re-organized into Number of ‘1’s minterms I(2) Implicant 2 literals I(4)


tabular format 0 0 0000 0,1 000-
(easier for program
1 1 0001 1,5 0-01
representations)
2 5 0101 5,7D 01-1
10 1010 5,13D -101
10,11 101-
3 7D 0111 7D,15 -111
11 1011 11,15 1-11
13D 1101 13D,15 11-1
4 15 1111
Slide 54
Quine McCluskey
F(w,x,y,z) = S (0,1,5,10,11,15) + D(7,13)
PI: EPI: non-EPI: y,z
00 01 11 10
(0,1) (0,1) 00 1 1
(1,5) (1,5) 01 1 X
(5,7D,13D,15) must (5,7D,13D,15) w,x
select 11 X 1
(11,15) (11,15)
10 1 1
(10,11) (10,11)

1. Re-organized into Number of ‘1’s minterms I(2) Implicant 2 literals I(4)


tabular format 0 0 0000 0,1 000-
keep track of
(easier for program
1 any unused 1 0001 1,5 0-01
representations) terms (here all
2 minterms are 5 0101 5,7D 01-1
used) 10 1010 5,13D -101
10,11 101-
3 7D 0111 7D,15 -111
11 1011 11,15 1-11
13D 1101 13D,15 11-1
4 15 1111
Slide 55
Quine McCluskey
F(w,x,y,z) = S (0,1,5,10,11,15) + D(7,13)
PI: EPI: non-EPI: y,z
00 01 11 10
(0,1) (0,1) 00 1 1
(1,5) (1,5) 01 1 X
(5,7D,13D,15) must (5,7D,13D,15) w,x
select 11 X 1
(11,15) (11,15)
10 1 1
(10,11) (10,11)

1. Re-organized into Number of ‘1’s minterms I(2) Implicant 2 literals I(4)


combine
1. same variable has
tabular format 0 0 0000 0,1 000- been eliminated
keep track of
(easier for program
1 any unused 1 0001 1,5 0-01 2. differ by one
representations) terms variable
2 5 0101 5,7D 01-1 5,7D,13D,15 -1-1
10 1010 5,13D -101
10,11 101- remove duplicates
3 7D 0111 7D,15 -111
11 1011 11,15 1-11
13D 1101 13D,15 11-1
4 15 1111
Slide 56
Quine McCluskey
F(w,x,y,z) = S (0,1,5,10,11,15) + D(7,13)
PI: EPI: non-EPI: y,z
00 01 11 10
(0,1) (0,1) 00 1 1
(1,5) (1,5) 01 1 X
(5,7D,13D,15) must (5,7D,13D,15) w,x
select 11 X 1
(11,15) (11,15)
10 1 1
(10,11) (10,11)

1. Re-organized into Number of ‘1’s minterms I(2) Implicant 2 literals I(4)


tabular format 0 0 0,1
keep track of
(easier for program
1 any unused 1 1,5
representations) terms
2 5 5,7D 5,7D,13D,15
10 5,13D
10,11 Remaining are
prime implicants
3 7D 7D,15
11 11,15
13D 13D,15
4 15
Slide 57
Quine McCluskey
F(w,x,y,z) = S (0,1,5,10,11,15) + D(7,13)
1. Re-organized into Number of ‘1’s minterms I(2) Implicant 2 literals I(4)
tabular format
0 0 0,1
(easier for program
representations) 1 1 1,5

2 5 5,7D 5,7D,13D,15
10 5,13D
10,11
3 7D 7D,15
11 11,15
13D 13D,15
4 15

PI 0,1 1,5 10,11 11,15 5,7D,13D,15


2. Cover minterms
minterms EPI EPI
0
1
5
10
11
15 Slide 58
Quine McCluskey
F(w,x,y,z) = S (0,1,5,10,11,15) + D(7,13)
1. Re-organized into Number of ‘1’s minterms I(2) Implicant 2 literals I(4)
tabular format
0 0 0,1
(easier for program
representations) 1 1 1,5

2 5 5,7D 5,7D,13D,15
10 5,13D
10,11
3 7D 7D,15
11 11,15
13D 13D,15
4 15

PI 0,1 1,5 10,11 11,15 5,7D,13D,15


2. Cover minterms
minterms EPI EPI
0 √
1 √ √
Don’t care’s are 5 √ √
eliminated from
10 √
this table
11 √ √
15 √ √ Slide 59
Quine McCluskey
F(w,x,y,z) = S (0,1,5,10,11,15) + D(7,13)
1. Re-organized into Number of ‘1’s minterms I(2) Implicant 2 literals I(4)
tabular format
0 0 0,1
(easier for program
representations) 1 1 1,5

2 5 5,7D 5,7D,13D,15
10 5,13D
10,11
3 7D 7D,15
11 11,15
13D 13D,15
4 15

PI 0,1 1,5 10,11 11,15 5,7D,13D,15


2. Cover minterms
minterms EPI EPI
EPI: find rows such that 0 √
a minterm is covered
1 √ √
only by one PI
5 √ √
10 √
11 √ √
15 √ √ Slide 60
Quine McCluskey
F(w,x,y,z) = S (0,1,5,10,11,15) + D(7,13)
1. Re-organized into Number of ‘1’s minterms I(2) Implicant 2 literals I(4)
tabular format
0 0 0,1
(easier for program
representations) 1 1 1,5

2 5 5,7D 5,7D,13D,15
10 5,13D
10,11
3 7D 7D,15
11 11,15
13D 13D,15
4 15

PI 0,1 1,5 10,11 11,15 5,7D,13D,15


2. Cover minterms
minterms EPI EPI
EPI: find rows such that 0 √
a minterm is covered
1 √ √
only by one PI
5 √ √
All minterms covered
by these EPIs are 10 √
eliminated 11 √ √
15 √ √ Slide 61
Quine McCluskey
F(w,x,y,z) = S (0,1,5,10,11,15) + D(7,13)
1. Re-organized into Number of ‘1’s minterms I(2) Implicant 2 literals I(4)
tabular format
0 0 0,1
(easier for program
representations) 1 1 1,5

2 5 5,7D 5,7D,13D,15
10 5,13D
10,11
3 7D 7D,15
11 11,15
13D 13D,15
4 15

PI 0,1 1,5 10,11 11,15 5,7D,13D,15


2. Cover minterms
minterms EPI EPI
n-EPI: select as per 0 √
previous selection rules
1 √ √
5 √ √
10 √
11 √ √
15 √ √ Slide 62
Assignment and Exam

Num. 1's
0
Quine McCluskey
completion example
minterms
0 0,1
I(2) I(4) I(8)

Gray cells can be filled-in,


leave blank if not used
1 1 1,5
Number minter I(2) Implicant 2 I(4)
Each PI: comma separated, no literals
spaces, sorted ascending order, do of ‘1’s ms
not identify don’t care minterms 0 0 0,1

2 5 5,7 5,7,13,15 1 1 1,5


10 5,13
10,11 remove duplicates
2 5 5,7D 5,7D,13D,15
10 5,13D
10,11
3 7 7,15
11 11,15
3 7D 7D,15
13 13,15 11 11,15
13D 13D,15
Order minterms 4 15
in ascending
order within the
Num 1’s rows
4 15
Order PI left-to-right in the
order of top-to-down, left-to-
right from the working table PI 0,1 1,5 10,11 11,15 5,7D,13D,15
5
minterms EPI EPI
Order minterms in
ascending order 0 √
PI1 PI2 PI3 PI4 PI5
minterm 0,1 1,5 10,11 11,15 5,7,13,15 1 √ √
0 √
1 √ √ 5 √ √
5 √ √ 10 √
10 √
11 Can use any character(s) in this table. √ √ 11 √ √
15 √ √ 15 √ √
1. PI ordering left-to-right: EPI first then nEPI
EPI & nEPI 0,1 10,11 5,7,13,15
F A'B'C' AB'C BD 2. Largest coverage first
3. Same coverage, order by smallest minterm first Slide 63

You might also like