Presentation on theme: "CS 121 Digital Logic Design"— Presentation transcript:
1CS 121 Digital Logic Design Chapter 3Gate-Level Minimization
2Outline 3.1 Introduction 3.2 The Map Method 3.3 Four-Variable Map 3.4 Product of sums simplification3.5 Don‘t Care Conditions3.7 NAND and NOR Implementaion3.8 Other Two-Level Implementaion3.9 Exclusive-OR function
33.1 Introduction (1-1)Gate-Level Minimization refers to the design task of finding an optimal gate-level implementation of the Boolean functions describing a digital circuit.Notes about simplification of Boolean expression:Minimum number of terms and literals in each term (minimum number of gates and inputs in the digram).Reduce the complexity of the digital gates.The simplest expression is not unique.Simplification Methods:Algebraic minimization lack on specific rules. (section 2.4).Karnaugh map or K-map.
43.2 The Map Method (1-12)A Karnaugh map is a graphical tool for assisting in the general simplification procedure.Combination of 2, 4, … adjacent squaresThe relation is:Logic circuit ↔ Boolean function ↔ Truth table ↔ K-map ↔ conical form ↔ satndrad form.Conical form: ( sum of minterms , product of maxterms.Standrad form: ( simplifier : sum of product , product of sum
53.2 The Map Method (2-12) Two-variable maps: Y’ Y X’ X Number of sequares (minterms) is 2 𝑛 , where n is the number of variables.So in tow-variable map there are 4 squares(minterms).Y’YX’X
63.2 The Map Method (3-12) Rules for K-map: We can reduce functions by circling 1’s in the K- mapEach circle represents a minterm reductionFollowing circling, we can deduce minimized and- or form.Rules to considerEvery cell containing a 1 must be included at least once.The largest possible “power of 2 rectangle” must be enclosed.The 1’s must be enclosed in the smallest possible number of rectangles.
73.2 The Map Method (4-12) Two-Variable maps (cont.) Example 1: F(X,Y) = XY’ + XYFrom the map, we see thatF (X,Y) = X.Note: There are implied 0s in other boxes.This can be justified using algebraic manipulations: F(X,Y) = XY’ + XY= X(Y’ +Y)= X.1= X1 1X
83.2 The Map Method (5-12) Two-Variable maps (cont.) Example 2: Y 1 X G(x,y) = m1 + m2 + m3YG(x,y) = m1 + m2 + m3= X’Y + XY’ + XYFrom the map, we can see that :G = X + Y1X
93.2 The Map Method (6-12) Two-Variable maps (cont.) Example 3: X’ 1 x y F0 0 10 1 11 0 01 1 0Example 3:F = Σ(0, 1)Using algebraic manipulations:F = Σ(0,1)= x’y + x’y’= x’ (y+y’)= x’1X’
103.2 The Map Method (7-12) Three-variable maps: 3 variables 8 squares ( minterms).On a 3-variable K-Map:One square represents a minterm with three variablesTwo adjacent squares represent a product term with two variablesFour “adjacent” terms represent a product term with one variablesEight “adjacent” terms is the function of all ones (logic 1).
123.2 The Map Method (9-12) three-Variable maps (cont.) 00 01 11 10 1 Example 2:F=AB’C’ +ABC +ABC +ABC + A’B’C + A’BC’From the map, we see thatF=A+BC +BCB C00011110A1111111
133.2 The Map Method (10-12) three-Variable maps (cont.) 00 01 11 10 1 Example 4 :F (x, y, z)= Σm (2, 3, 6, 7)Yusing algebraic manipulations:F(x , y, z) = x’yz + xyz + x’yz’ + xyz’= yz (x’ + x) + yz’ (x’ + x)= yz + yz’= y (z + z’)= yy z00011110x11111
143.2 The Map Method (11-12) three-Variable maps (cont.) Example (3-1) , (3-2) :
153.2 The Map Method (12-12) three-Variable maps (cont.) Example (3-3) , (3-4) :
163.3 Four-Variables Map (1-9) 4 variables 16 squares ( minterms).On a 4-variable K-Map:Two adjacent squares represent a term of three literals.Four adjacent squares represent a term of two literals.Eight adjacent squares represent a term of one literal.Note: The larger the number of squares combined, the smaller the number of literals in the term.
203.3 Four-Variables Map (5-9) Simplification using Prime ImplicantsA Prime Implicant is a product term obtained by combining the maximum possible number of adjacent squares in the map .If a minterm in a square is covered by only one prime implicant, that implicant is called Essential .Prime Implicants and Essential Prime Implicants can be determined by inspection of a K-Map.Notes:Two adjacent 1’s form prime implicant, if they are not within a group of four adjacent squares.Four adjacent 1’s form prime implicant, if they are not within a group of eight adjacent squares and so on.
21ESSENTIAL Prime Implicants 3.3 Four-Variables Map (6-9)Simplification using Prime ImplicantsExample 1:F(A,B,C,D) = ∑ (0,2,3,5,7,8,9,10,11,13,15)ESSENTIAL Prime ImplicantsCD1BDAC1BCDADBDBCBMinterms covered by single prime implicantBDBDADBA
223.3 Four-Variables Map (7-9) Simplification using Prime ImplicantsExample 1:F(A,B,C,D) = ∑ (0,2,3,5,7,8,9,10,11,13,15)Essential prim implicants:BD , B’D’Prime implicant: CD , B’C, AD , AB’.The minterms that not cover by essential implicants are: m3, m9, m11.The simplified expression is optained from the sum of the essential implicants and other prime implicants that may be needed to cover any remaining minterms.So this function can be written with these ways:F = BD + B’D’ + CD + ADF = BD + B’D’ + CD + AB’F = BD + B’D’ + B’C + ADF = BD + B’D’ + B’C + AB’
23Note: that all of these prime implicants are essential. 3.3 Four-Variables Map (8-9)Simplification using Prime ImplicantsExample 2:F(W,X,Y,Z) = ∑ (0,2,3,8,9,10,11,12,13,14,15)XYZWX’YX’Z’111Note: that all of these prime implicants are essential.11111111W
253.5 Producut-of-Sum simplification (1-9) Mark with 1’s the minterms of F.Mark with 0’s the minterms of F’.Circle 0’s to express F’.Complement the result in step 3 to obtain a simplified F in product-of-sums form.
263.5 Producut-of-Sum simplification (1-9) Example 1:Simplify : F= ∑(0,1,2,5,8,9,10) in Product-of-Sums FormF’ = AB + CD + BD’F = (F’)’ = (A’+B’) + (C’+D’) + (B’+D)CDBCDA1111BD’AB111
283.6 Don't Cares Condition (1-4) Sometimes a function table or map contains entries for which it is known:The input values for the minterm will never occur, orThe output value for the minterm is not used.Functions that have unspecified outputs for some input combinations are called incompletely specified functions.In these cases, the output value is defined as a “don't care” ( an “x” entry) assumed to be either 0 or 1.The choice between 0 and 1 is depending on the way the incompletely specified function is simplied.By placing “don't cares” in the function table or map, the cost of the logic circuit may be lowered.
293.6 Don't Cares Condition (2-4) Example :A logic function having the binary codes for the BCD digits as its inputs. Only the codes for 0 through 9 are used.The six codes, 1010 through 1111 never occur, so the output values for these codes are “x” to represent “don’t cares.”
303.6 Don't Cares Condition (3-4) Example (3.9) :F(W,X,Y,Z) = ∑ (1,3,7,11,15)d(W,X,Y,Z) = ∑ (0,2,5)XYZWXYZWx1x1x11xxx111111F = YZ + W’ZF = YZ + W’X’
323.7 NAND and NOR Implementation (1-15) Digital circuits are frequently constructed with NAND or NOR gates rather than with AND and OR gates.
333.7 NAND and NOR Implementation (2-15) NAND ImplementationNAND gate: a universal gate.Any digital system can be implemented with it.
343.7 NAND and NOR Implementation (3-15) NAND ImplementationTo facilitate the conversion to NAND logic, there are alternative graphic symbol for it.
353.7 NAND and NOR Implementation (4-15) NAND ImplementationTwo-Level ImplementationProcedures of Implementation with two levels of NAND gates:Express simplified function in sum of products form.Draw a NAND gate for each product term that has at least two literals to constitute a group of first-level gatesDraw a single gate using AND-invert or invert-OR in the second levelA term with a single literal requires an inverter in the first level.
363.7 NAND and NOR Implementation (5-15) NAND ImplementationTwo-Level ImplementationF = AB + CD= [(AB + CD)’]’= [(AB)’*(CD)’]’
373.7 NAND and NOR Implementation (6-15) NAND ImplementationTwo-Level ImplementationExample (3.10):F(X,Y,Z) = ∑ (1,2,3,4,5,7)X’YF = XY’ + X’Y + Zy z00011110x1111111ZXY’
383.7 NAND and NOR Implementation (7-15) NAND ImplementationMultilevel ImplementationProcedures of Implementation with multilevel of NAND gates:Convert all AND gates to NAND gates with AND-invert graphic symbolsConvert all OR gates to NAND gates with invert-OR graphic symbolsCheck all the bubbles in the diagrams. For a single bubble, invert aninverter (one-input NAND gate) or complement the input literal
393.7 NAND and NOR Implementation (8-15) NAND ImplementationMultilevel ImplementationEXAMPLE 1:F = A(CD + B) + BC’
403.7 NAND and NOR Implementation (9-15) NAND ImplementationMultilevel ImplementationEXAMPLE 2:F = (AB’ + A’B).(C + D’)
413.7 NAND and NOR Implementation (10-15) The NOR operation is the dual of the NAND operation.The NOR gate is anothar universal gate to implement any Boolean function.
423.7 NAND and NOR Implementation (11-15) To facilitate the conversion to NOR logic, there are alternative graphic symbol for it.
433.7 NAND and NOR Implementation (12-15) Two-Level ImplementationProcedures of Implementation with two levels of NOR gates:Express simplified function in product of sums form.Draw a NOR gate for each product term that has at least two literals to constitute a group of first-level gatesDraw a single gate using OR-invert or invert-AND in the second levelA term with a single literal requires an inverter in the first level.
443.7 NAND and NOR Implementation (13-15) Two-Level ImplementationExample :F = (A+B).(C+D).EE
453.7 NAND and NOR Implementation (14-15) Multilevel ImplementationProcedures of Implementation with multilevel of NOR gates:Convert all OR gates to NOR gates with OR-invert graphic symbolsConvert all AND gates to NOR gates with invert-AND graphic symbolsCheck all the bubbles in the diagrams. For a single bubble, invert aninverter (one-input NAND gate) or complement the input literal
463.7 NAND and NOR Implementation (15-15) Multi-Level ImplementationExample :F = (A B’ + A’B).(C+D’)AB’A’B
473.8 Other Two-Level Implementations (1-7) Nondegeneratd forms Implementation16 possible combinations of two-level forms with 4 types of gates: AND, OR, NAND, and NOR8 are degenerate forms: degenerate to a single operation.(AND-AND , AND-NAND, OR-OR , OR-NOR , NAND-NAND , NAND-NOR , NOR-AND , NOR-NAND)8 are generate forms:NAND-AND = AND-NOR = AND-OR-INVERTOR-NAND = NOR-OR = OR-AND-INVERT
483.8 Other Two-Level Implementations (3-7) Nondegeneraetd forms ImplementationNORNANDORAND2nd level1st level#(3.4)$(3.6)Discussed beforeGenerated formsDiscuss now
493.8 Other Two-Level Implementations (4-7) Nondegeneraetd forms ImplementationAND-OR-INVERTAND-NOR = NAND-AND = AND-OR-INVERTSimilar to AND-OR, AND-OR-INVERT requires an expression in sum of productsExample: F = (AB + CD + E) ‘
503.8 Other Two-Level Implementations (5-7) Nondegeneraetd forms ImplementationOR-AND-INVERTAND-NOR = NAND-AND = AND-OR-INVERTSimilar to OR-AND, OR-AND-INVERT requires an expression in product of sumsExample: F = [(A+B) . (C+D) . E ] ‘
51Implements the Function Equivalent Nondegenerate form 3.8 Other Two-Level Implementations (6-7)Nondegeneraetd forms ImplementationTo Get an Output ofSimplify F’ intoImplements the FunctionEquivalent Nondegenerate formbaFsum-of-products form by combining 0’s in the mapAND-OR-INVERTNAND-ANDAND-NORproduct-of-sums form by combining 1’s in the map and then complementingOR-AND-INVERTNOR-OROR-NAND
533.9 Exclusive-OR Function (1-7) Exclusive-OR (XOR) denoted by the symbol :x y = xy‘ + x‘yExclusive-OR is equal to 1, when the values of x and y are diffrent.Exclusive-NOR (XNOR):(x y )‘ = xy + x‘y‘Exclusive-NOR is equal to 1, when the values of x and y are same.Only a limited number of Boolean functions can be expressed in terms of XOR operations, but it is particularly useful in arithmetic operations and error-detection and correction circuits.
543.9 Exclusive-OR Function (2-7) Exclusive-OR principles:x 0 = xx 1 = x‘x x = 0x x‘ = 1x y‘ = x‘ y = (x y)‘x y = y x(x y) z = x (y z)
553.9 Exclusive-OR Function (3-7) Implementaion Exclusive-OR with AND-OR-NOT:x y = xy‘ + x‘yImplementaion Exclusive-OR with NAND:= x (x‘+y‘) + y (x‘+y‘)= x (xy)‘ + y (xy)‘= [ (x(xy)‘ + y(xy)‘)‘]‘= [ (x(xy)‘)‘ + (y(xy)‘)‘ ]‘
563.9 Exclusive-OR Function (4-7) Odd Function:The 3-variable XOR function is equal to 1 if only one variable is equal to 1 or if all three variables are equal to 1.Multiple-variable exclusive OR operation = odd function : odd number of variables be equal to 1.(A B C) = (AB‘ + A‘B) C‘ + (A‘B‘ + AB) C= AB‘C‘ + A‘BC‘ + A‘B‘C + ABC= ∑ (1,2,4,7)
583.9 Exclusive-OR Function (6-7) Odd Function:A B C D= ∑ (1,2,4,7,8,11,13,14)
593.9 Exclusive-OR Function (7-7) Parity Generation and Checking:Exclusive-OR function is useful in systems requiring error-detection and correction circuits.A parity bit is used for purpose of detection errors during transmission.Parity bit : an extra bit included with a binary message to make the number of 1’s either odd or even.The circuit generates the parity bit in transmitter is called parity generator.The circuit checks the parity bit in receiver is called parity checker.
603.9 Exclusive-OR Function (8-7) Parity Generation and Checking:Example : Three-bit message with even parityThree-bit MassageParity bitXYZP1From the truth table , P constitutes an odd function.It is equal 1 when numerical value of 1’s in a minterm is oddP = x y z
613.9 Exclusive-OR Function (8-7) Parity Generation and Checking:Example : Three-bit message with even parityFrom the truth table , C constitutes an odd function.It is equal 1 when numerical value of 1’s in a minterm is oddC = x y z P