chapter 3: principles of combinational logic (sections 3.1 – 3.5)
TRANSCRIPT
CHAPTER 3: PRINCIPLES CHAPTER 3: PRINCIPLES
OF COMBINATIONAL LOGICOF COMBINATIONAL LOGIC
(Sections 3.1 – 3.5)(Sections 3.1 – 3.5)
3.1 DEFINITION OF 3.1 DEFINITION OF COMBINATIONAL LOGICCOMBINATIONAL LOGIC
Logic circuits without feedback from output to the Logic circuits without feedback from output to the input, constructed from a functionally complete input, constructed from a functionally complete gate set, are said to be combinational.gate set, are said to be combinational.
Inputs OutputsCombinatioCombinational Logic nal Logic FunctionsFunctions
· ·
····
· ·
····
3.1.1 PROBLEM STATEMENTS TO 3.1.1 PROBLEM STATEMENTS TO TRUTH TABLESTRUTH TABLES
E.g : Conveyor system(P85, E.g : Conveyor system(P85, Ex. 3.1) Ex. 3.1)
M=a’bms+ab’ms+abmM=a’bms+ab’ms+abmss
3.1.1 PROBLEM STATEMENTS TO 3.1.1 PROBLEM STATEMENTS TO TRUTH TABLESTRUTH TABLES
E.g. A NASA E.g. A NASA system(P87, Ex. 3.2)system(P87, Ex. 3.2)
C1C1
C2C2C3C3
3.1.1 PROBLEM STATEMENTS TO 3.1.1 PROBLEM STATEMENTS TO TRUTH TABLESTRUTH TABLES
E.g. Conveyor system(P88, E.g. Conveyor system(P88, ex. 3.4)ex. 3.4)
S3
S1
S2
m3
m1
m2 m4
The process of converting a verbal problem The process of converting a verbal problem statement into a truth table :statement into a truth table : Determine the input variables and output variables that
are involved Assign mnemonic or letter or number symbols to each
variable determine the size of the truth table; how many input
combinations exist: 2x=y where x=number of input variables and y=number of combinations.
Construct a truth table containing all of the input variable combinations
By careful reading of the problem statement determine the combinations of inputs that cause a given output to be true
3.1.1 PROBLEM STATEMENTS TO 3.1.1 PROBLEM STATEMENTS TO TRUTH TABLESTRUTH TABLES
Exe: Design a truth table to indicate a Exe: Design a truth table to indicate a majority of three inputs is truemajority of three inputs is true
3.1.1 PROBLEM STATEMENTS TO 3.1.1 PROBLEM STATEMENTS TO TRUTH TABLESTRUTH TABLES
II33 I I2 2 I I11 O O11
0 0 0 00 0 0 0
0 0 1 00 0 1 0
0 1 0 00 1 0 0
0 1 1 10 1 1 1
1 0 0 01 0 0 0
1 0 1 11 0 1 1
1 1 0 11 1 0 1
1 1 1 11 1 1 1
3.1.2 Deriving Switching Equations3.1.2 Deriving Switching Equations
DefinitionsDefinitions Product term: literals connected by • Sum term: literals connected by + Minterm: a product term in which all the variables
appear exactly once, either complemented or uncomplemented
Maxterm: a sum term in which all the variables appear exactly once, either complemented or uncomplemented
MintermMinterm
Represents exactly one combination in the Represents exactly one combination in the truth table.truth table.
Denoted by Denoted by mmjj, where , where j j is the decimal is the decimal equivalent of the minterm’s corresponding equivalent of the minterm’s corresponding binary combination binary combination (b(bjj))..
A variable in A variable in mmjj is complemented if its value is complemented if its value in in bbjj is 0, otherwise is uncomplemented. is 0, otherwise is uncomplemented.
M(a,b,m,s)=a’bms+ab’ms+abmsM(a,b,m,s)=a’bms+ab’ms+abms (m(m77) (m) (m1111) (m) (m1515))
MaxtermMaxterm
Represents exactly one combination in the truth Represents exactly one combination in the truth table.table.
Denoted by Denoted by MMjj, where , where j j is the decimal equivalent is the decimal equivalent of the maxterm’s corresponding binary of the maxterm’s corresponding binary combination combination (b(bjj))..
A variable in A variable in MMjj is complemented if its value in is complemented if its value in bbjj is 1, otherwise is uncomplemented.is 1, otherwise is uncomplemented.
F(a,b,c)=(a’+b+c’)(a+b+c’)(a+b’+c’)F(a,b,c)=(a’+b+c’)(a+b+c’)(a+b’+c’) 101 001 011101 001 011
MM55 M M11 M M33
Truth Table notation for Minterms Truth Table notation for Minterms and Maxtermsand Maxterms
3 variables x,y,z (order is fixed)3 variables x,y,z (order is fixed)
3.2 Canonical(3.2 Canonical( 规范规范 ) Forms) Forms Any Boolean function F( ) can be expressed Any Boolean function F( ) can be expressed
as a as a uniqueunique sumsum of of minminterms and a unique terms and a unique productproduct of of maxmaxterms (under a fixed variable terms (under a fixed variable ordering).ordering).
every function F() has two canonical forms:every function F() has two canonical forms: Canonical Sum-Of-Products (sum of minterms) Canonical Product-Of-Sums (product of maxterms)
Expand Expand non-canonicalnon-canonical terms by inserting terms by inserting equivalent of 1 in each missing variable x:equivalent of 1 in each missing variable x: (x + x’) = 1 (x + x’) = 1
Remove duplicate mintermsRemove duplicate minterms ff11(a,b,c) = a’b’c + bc’ + ac’(a,b,c) = a’b’c + bc’ + ac’
= a’b’c + = a’b’c + (a+a’)(a+a’)bc’ + abc’ + a(b+b’)(b+b’)c’c’ = a’b’c + = a’b’c + abc’abc’ + a’bc’ + + a’bc’ + abc’abc’ + ab’c’ + ab’c’ = a’b’c + abc’ + a’bc + ab’c’ = a’b’c + abc’ + a’bc + ab’c’
Convert switching equations to Convert switching equations to canonical formcanonical form
Convert switching equations to Convert switching equations to canonical formcanonical form
SOPSOP
E.g. P=f(a,b,c)=ab’+ac’+bcE.g. P=f(a,b,c)=ab’+ac’+bc
=ab’(c+c’)+ac’ (b+b’)+bc(a+a’)=ab’(c+c’)+ac’ (b+b’)+bc(a+a’)
=ab’c+ab’c’+abc’+ab’c’+abc+a’bc=ab’c+ab’c’+abc’+ab’c’+abc+a’bc
=ab’c+ab’c’+abc’+abc+a’bc=ab’c+ab’c’+abc’+abc+a’bc
Expand noncanonical terms by adding 0 in terms of Expand noncanonical terms by adding 0 in terms of missing variables (missing variables (e.g.e.g., xx’ = 0) and using the , xx’ = 0) and using the distributive lawdistributive law
Remove duplicate maxtermsRemove duplicate maxterms ff11(a,b,c) = (a+b+c)•(b’+c’)•(a’+c’)(a,b,c) = (a+b+c)•(b’+c’)•(a’+c’)
= (a+b+c)•( = (a+b+c)•(aa’aa’+b’+c’)•(a’++b’+c’)•(a’+bb’bb’+c’)+c’) = (a+b+c)•(a+b’+c’)• = (a+b+c)•(a+b’+c’)•(a’+b’+c’)(a’+b’+c’)••
(a’+b+c’)• (a’+b+c’)•(a’+b’+c’)(a’+b’+c’) = =
(a+b+c)•(a+b’+c’)•(a’+b’+c’)•(a’+b+c’)(a+b+c)•(a+b’+c’)•(a’+b’+c’)•(a’+b+c’)
Convert switching equations to Convert switching equations to canonical formcanonical form
Convert switching equations to Convert switching equations to canonical formcanonical form
POSPOS
E.g. T=f(a,b,c)=(a+b’)(b’+c)E.g. T=f(a,b,c)=(a+b’)(b’+c)
=(a+b’+cc’)(b’+c+aa’)=(a+b’+cc’)(b’+c+aa’)
=(a+b’+c) (a+b’+c’)(a+b’+c)=(a+b’+c) (a+b’+c’)(a+b’+c)(a’+b’+c)(a’+b’+c) =(a+b’+c) (a+b’+c’)(a’+b’+c)=(a+b’+c) (a+b’+c’)(a’+b’+c)
Exe:Exe:
P=f(w,x,y,z)=w’x+yz’P=f(w,x,y,z)=w’x+yz’
T=f(a,b,c,d)=(a+b’+c)(a’+d)T=f(a,b,c,d)=(a+b’+c)(a’+d)
Convert switching equations to Convert switching equations to canonical formcanonical form
Ans:Ans:
P=f(w,x,y,z)=wxyz’+wx’yz’+w’xyz+w’xyz’+w’xy’zP=f(w,x,y,z)=wxyz’+wx’yz’+w’xyz+w’xyz’+w’xy’z+w’xy’z’+w’x’yz’+w’xy’z’+w’x’yz’
T=f(a,b,c,d)= (a+b’+c+d) (a+b’+c+d’) (a’+b+c+d) T=f(a,b,c,d)= (a+b’+c+d) (a+b’+c+d’) (a’+b+c+d) (a’+b’+c+d) (a’+b+c’+d) (a’+b’+c’+d)(a’+b’+c+d) (a’+b+c’+d) (a’+b’+c’+d)
3.3 GENERATION OF SWITCHING 3.3 GENERATION OF SWITCHING EQUATIONS FROM TRUTH TABLESEQUATIONS FROM TRUTH TABLES
Canonical Sum-Of-Products:Canonical Sum-Of-Products:The minterms included are those mThe minterms included are those mjj such such
that F( ) = 1 in row that F( ) = 1 in row jj of the truth table for F( of the truth table for F( ).).
Canonical Product-Of-Sums:Canonical Product-Of-Sums:The maxterms included are those MThe maxterms included are those Mjj such such
that F( ) = 0 in row that F( ) = 0 in row jj of the truth table for F( of the truth table for F( ).).
ExampleExample
Truth table for fTruth table for f11(a,b,c) at right(a,b,c) at right The canonical sum-of-products form for The canonical sum-of-products form for
ff11 is isff11(a,b,c) = m(a,b,c) = m11 + m + m22 + m + m44 + m + m66
= a’b’c + a’bc’ + ab’c’ + abc’ = a’b’c + a’bc’ + ab’c’ + abc’ The canonical product-of-sums form for The canonical product-of-sums form for
ff1 1 isisff11(a,b,c) = M(a,b,c) = M00 •• M M33 • • MM55 • • MM77 = (a+b+c) = (a+b+c)••(a+b’+c’)(a+b’+c’)• •
(a’+b+c’)(a’+b+c’)••(a’+b’+c’).(a’+b’+c’). Observe that: mObserve that: mjj = M = Mjj’’
00111111
11001111
00110011
11000011
00111100
11001100
11110000
00000000
ff11ccbbaa
Shorthand: Shorthand: ∑∑ and ∏ and ∏ ff11(a,b,c) = (a,b,c) = ∑∑ mm(1,2,4,6), where(1,2,4,6), where ∑ indicates that this ∑ indicates that this
is a sum-of-products form, and m(1,2,4,6) is a sum-of-products form, and m(1,2,4,6) indicates that the minterms to be included are mindicates that the minterms to be included are m11, ,
mm22, m, m44, and m, and m66..
ff11(a,b,c) = ∏(a,b,c) = ∏ M(0,3,5,7), where ∏ indicates that M(0,3,5,7), where ∏ indicates that
this is a product-of-sums form, and M(0,3,5,7) this is a product-of-sums form, and M(0,3,5,7) indicates that the maxterms to be included are Mindicates that the maxterms to be included are M00, ,
MM33, M, M55, and M, and M77..
∑∑ m(1,2,4,6) = ∏m(1,2,4,6) = ∏ M(0,3,5,7) = fM(0,3,5,7) = f11(a,b,c) (a,b,c)
Conversion Between Canonical FormsConversion Between Canonical Forms
Replace Replace ∑∑ with with ∏∏ (or (or vice versavice versa) and replace those ) and replace those j’j’s that s that appeared in the original form with those that do not.appeared in the original form with those that do not.
Example:Example:ff11(a,b,c)(a,b,c) = a’b’c + a’bc’ + ab’c’ + abc’ = a’b’c + a’bc’ + ab’c’ + abc’
= m= m11 + m + m22 + m + m44 + m + m66
= = ∑∑((1,2,4,61,2,4,6))
= = ∏∏((0,3,5,70,3,5,7)) = (a+b+c)•(a+b’+c’)•(a’+b+c’)•(a’+b’+c’) = (a+b+c)•(a+b’+c’)•(a’+b+c’)•(a’+b’+c’)
Karnaugh MapsKarnaugh Maps
Why Karnaugh mapsWhy Karnaugh maps ??to simplify boolean equationsto simplify boolean equations
Karnaugh maps (K-maps) are Karnaugh maps (K-maps) are graphicalgraphical representations of boolean functions.representations of boolean functions.
One One map cellmap cell corresponds to a row in the corresponds to a row in the truth table.truth table.
one map cell corresponds to a minterm or a one map cell corresponds to a minterm or a maxterm in the boolean expressionmaxterm in the boolean expression
Karnaugh MapsKarnaugh Maps
mm
00mm
33
mm
11
mm
22
0 1
1
0
AB
mm
00mm
11
mm
33
mm
77
mm
55
mm
22
mm
66
mm
44
00 01 11 10
0
1
AB
C
mm
00mm
11mm
33
mm
55
mm11
33
mm
99
mm
44
mm11
22
mm
88
mm
66
mm1414 mm11
00
mm
77
mm11
55
mm11
11mm
22
ABCD 00 01 11 10
00
01
11
10
Logic adjacencyLogic adjacency : Any two : Any two adjacent cells in the map adjacent cells in the map differ by ONLY one. differ by ONLY one.
Example:Example:mm0 0 (=x(=x11’x’x22’) is adjacent to m’) is adjacent to m1 1
(=x(=x11’x’x22) and m) and m2 2 (=x(=x11xx22’) but ’) but
NOT mNOT m3 3 (=x(=x11xx22) )
2-2-Variable Map -- Example Variable Map -- Example E.g. E.g.
f(xf(x11,x,x22) = x) = x11’x’x22’+ x’+ x11’x’x22 + x + x11xx22’ ’ = m = m00 + m + m11 + m + m22
What (simpler) function is What (simpler) function is
represented by each dashed represented by each dashed rectangle?rectangle? x1’x2’+ x1’x2 =x1’(x2’+x2)=x1’ x1’x2’+ x1x2’=x2’(x1’+x1) =x2’
f(x1,x2) =x1’+x2’
001111
111100
1100xx22
x1
0 2
1 3
Minimization as SOP using K-mapMinimization as SOP using K-map
Enter 1s in the K-map for each product Enter 1s in the K-map for each product term in the functionterm in the function
Group Group adjacentadjacent K-map cells containing 1s to K-map cells containing 1s to obtain a product with fewer variables. obtain a product with fewer variables. Groups must be in power of 2 (2, 4, 8, …)Groups must be in power of 2 (2, 4, 8, …)
Handle “Handle “boundary wrapboundary wrap” for K-maps of 3 ” for K-maps of 3 or more variables.or more variables.
Three-Variable MapThree-Variable Map
mm66mm77mm55mm4411
mm22mm33mm11mm0000
1010111101010000
yzyz
x0 1 3 2
4 5 7 6
-Note: variable ordering is (x,y,z); yz specifies column, x specifies row.-Each cell is adjacent to three other cells (left or right or top or bottom or edge wrap)
Three-Variable Map (cont.)Three-Variable Map (cont.)
The types of structures that are The types of structures that are either minterms or are generated either minterms or are generated by repeated application of the by repeated application of the minimization theorem on a three minimization theorem on a three variable map are shown at right. variable map are shown at right. Groups of 1, 2, 4, 8 are possible.Groups of 1, 2, 4, 8 are possible.
minterm
group of 2 terms
group of 4 terms
SimplificationSimplification
Example: f(a,b,c) = ac’ + abc + bc’Example: f(a,b,c) = ac’ + abc + bc’
=a=a(b+b’)(b+b’)c’+abc+c’+abc+(a+a’)(a+a’)bc’bc’
=abc’+ab’c’+abc+abc’+a’bc’=abc’+ab’c’+abc+abc’+a’bc’
=abc’+ab’c’+abc+a’bc’=abc’+ab’c’+abc+a’bc’ Result: f(a,b,c) = Result: f(a,b,c) = ac’ac’++abab++bc’bc’
11
111111
abc
1010111101010000
11
00
More ExamplesMore Examples
ff11(x, y, z) = (x, y, z) = ∑∑ m(2,3,5,7) m(2,3,5,7)
ff22(x, y, z) = ∑ m (0,1,2,3,6)(x, y, z) = ∑ m (0,1,2,3,6)
ff11(x, y, z) = (x, y, z) = x’yx’y + + xzxz
ff22(x, y, z) = (x, y, z) = x’x’++yz’yz’
1010111101010000
xyxy
zz
11
00
11 11
11
11
1111
111111
xyxy
zz
1010111101010000
11
00
1010
1111
0101
0000
Four-Variable MapsFour-Variable Maps
Top cells are adjacent to bottom cells. Left-Top cells are adjacent to bottom cells. Left-edge cells are adjacent to right-edge cells.edge cells are adjacent to right-edge cells.
Note variable ordering (WXYZ).Note variable ordering (WXYZ).
mm1010mm1111mm99mm88
mm1414mm1515mm1313mm1212
mm66mm77mm55mm44
mm22mm33mm11mm00
1010 1111 0101 0000WXWX
YZ
Four-variable Map SimplificationFour-variable Map Simplification One square represents a minterm of 4 literals.One square represents a minterm of 4 literals. A rectangle of 2 adjacent squares represents a A rectangle of 2 adjacent squares represents a
product term of 3 literals.product term of 3 literals. A rectangle of 4 squares represents a product term A rectangle of 4 squares represents a product term
of 2 literals.of 2 literals. A rectangle of 8 squares represents a product term A rectangle of 8 squares represents a product term
of 1 literal.of 1 literal. A rectangle of 16 squares produces a function that A rectangle of 16 squares produces a function that
is equal to logic 1.is equal to logic 1.
ExampleExample Simplify the following Boolean function Simplify the following Boolean function
(A,B,C,D) = (A,B,C,D) = ∑∑m(0,1,2,3,4,5,6,7,8,10,13).m(0,1,2,3,4,5,6,7,8,10,13). First put the function g( ) into the map, and then First put the function g( ) into the map, and then
group as many 1s as possible.group as many 1s as possible.abab
cdcd
11 1111
1111
11 1111
11 1111
g(A,B,C,D) = g(A,B,C,D) = a’a’++b’d’b’d’++bc’dbc’d
111111
1111
111111
111111
1010
1111
0101
0000 1010 1111 0101 0000
Implicants ,Prime Implicants (PIs) and Implicants ,Prime Implicants (PIs) and Essential Prime ImplicantEssential Prime Implicant (EPI)(EPI)
Implicant: Implicant: any single minterm
Prime Implicant Prime Implicant (PI)(PI): a group of minterms that cannot be combined with any other minterms or groups
Essential Prime Implicant Essential Prime Implicant (EPI): (EPI): a PI in which one or more miniterms are unique
How to find PI and EPI?How to find PI and EPI?
1
1 1
1
1 1
A’BC’DBCD
BDABC’
AC’D’
00 01 11 10
00
01
11
10
ABCD
1?1?
ExampleExample
a’b’a’b’ is is notnot a prime implicant a prime implicant because it is contained in because it is contained in b’.b’.
acdacd is is notnot a prime implicant a prime implicant because it is contained in because it is contained in adad..
b’, ad, and a’cd’ are prime b’, ad, and a’cd’ are prime implicants.implicants.
b’, ad, and a’cd’ are essentialb’, ad, and a’cd’ are essential
prime implicants.prime implicants.111111
111111
111111
1111
b’
cd ab
ad
a’cd’
a’b’
acd
Another ExampleAnother Example Consider fConsider f22(a,b,c,d), whose K-map (a,b,c,d), whose K-map
is shown below.is shown below. The only essential PI isThe only essential PI is b’d.b’d.
111111
1111
111111
11cd
ab
Systematic Procedure for Systematic Procedure for Simplifying Boolean FunctionsSimplifying Boolean Functions
1. Load the minterms into the K-map by placing a 1 in the appropriate square.
2. Look for groups of minterms (PI)1. The group size must be a power of 22. Find the largest groups of minterms first, then smaller
collections until all groups are found.3. Find all essential PIs.4. For remaining min-terms not included in the
essential PIs, select a set of other PIs to cover them.
5. The resulting simplified function is the logical OR of the product terms selected above.
ExampleExample
f(a,b,c,d) = f(a,b,c,d) = ∑∑m(0,1,4,5,8,11,12,13,15).m(0,1,4,5,8,11,12,13,15).
F(a,b,c,d) = c’d’ + a’c’ + bc’ F(a,b,c,d) = c’d’ + a’c’ + bc’ + acd+ acd
1111
111111
11111111cd
ab
HomeworkHomework
Simplifying Boolean FunctionsSimplifying Boolean Functions F(x,y,z)=F(x,y,z)=∑(0,2,3,4,5,7)∑(0,2,3,4,5,7) F(a,b,c,d)=F(a,b,c,d)=∑(0,3,4,5,7,11,13,15)∑(0,3,4,5,7,11,13,15) F(w,x,y,z)=∑(0,1,4,5,9,11,13,15)F(w,x,y,z)=∑(0,1,4,5,9,11,13,15) F(a,b,c,d)=∑(0,1,2,4,5,6,8,9,12,13,14)F(a,b,c,d)=∑(0,1,2,4,5,6,8,9,12,13,14) F(a,b,c,d)=∑(1,3,4,5,7,8,9,11,15)F(a,b,c,d)=∑(1,3,4,5,7,8,9,11,15)
F(w,x,y,z)=∑(1,5,7,8,9,10,11,13,15)F(w,x,y,z)=∑(1,5,7,8,9,10,11,13,15) P151: 4-c, 4-eP151: 4-c, 4-e