150 likes | 293 Views
ECE 2110: Introduction to Digital Systems. PoS minimization Don’t care conditions. Previous…. Sum-of-Products (SoP) minimization. Simplifying the Product of Sums (Principle of Duality: looking on the 0s on a K-map).
E N D
ECE 2110: Introduction to Digital Systems PoS minimization Don’t care conditions
Previous… • Sum-of-Products (SoP) minimization
Simplifying the Product of Sums(Principle of Duality: looking on the 0s on a K-map) • Two main steps :1) Combining/Grouping the 0 cells.2) Writing the sum term for each group. • Rules : ( for n-variable function ) • 1) The group size must be a power of 2.2) A set of 2^i cells can be combined if there are ( i ) variables that take all possible combinations within the set and the remaining ( n-i ) variables have the same value within that set. • 3) The corresponding sum term for each group contains (n-i) literals: - The variable is complemented if it is 1 in the combined cells - The variable is uncomplemented it it 0 in the combined cells - The variable in not included in the product term if it takes the values 0 and 1 within the combined cells
ExampleF= W • The prime implicants:- Cells (0,1,8,9) X=0, Y=0 The sum term : X+Y- Cells (8,10,12,14) W=1, Z=0 The sum term : W’+Z • The two prime implicants are essential prime implicants and cover all zeros • The minimal product of sums : F=(X+Y).(W’+Z) WX 00 01 11 10 YZ 0 4 12 8 00 0 1 0 0 1 5 13 9 01 0 1 1 0 Z 3 7 15 11 11 1 1 1 1 Y 2 6 14 10 10 1 1 0 0 X
Simplifying Products of Sums PoS- Another method F= • 1- Complement the function. (F’) 2- Use K-map to get the minimal sum of the complement function (F’).3- Complement the minimal sum to get the minimal product • Example : In the previous example the function is complemented and represented using K-map :- The essential prime implicants are: X’Y’, WZ’- The minimal SoP : M= X’.Y’+W.Z’- F = (F’)’=M’ = (X’.Y’+W.Z’)’ = (X+Y).(W’+Z) W WX 00 01 11 10 YZ 0 4 12 8 00 1 0 1 1 1 5 13 9 01 1 0 0 1 Z 3 7 15 11 11 0 0 0 0 Y 2 6 14 10 10 0 0 1 1 X
Minimal PoS vs. Minimal SoP:F= • In this same example, the minimal SoP is • F =W’X+W’Y+XZ+YZ • The minimal PoS was F=(X+Y).(W’+Z) • Which representation has lower cost? • In this case the minimal PoS implementation is cheaper • In general: • To find the best realization compare the minimal product and the minimal sum products. W WX 00 01 11 10 YZ 0 4 12 8 00 0 1 0 0 1 5 13 9 01 0 1 1 0 3 7 15 11 Z 11 1 1 1 1 Y 2 6 14 10 10 1 1 0 0 X
Don’t Care Conditions: • In some applications, the Boolean function for certain combinations of the input variables is not specified. The corresponding minterms (maxterms) are called “don't care minterms (maxterms)”. • In K-map , the “don't care minterms/maxterms” are represented by “d”. • Since the output function for those minterms (maxterms) is not specified, those minterms (maxterms) could be combined with the adjacent 1 cells(0-cells) to get a more simplified sum-of-products (product-of-sums) expression.
New Rules for circling sets of 1s(Sum-of-Products simplification) • Allow d’s to be included when circling sets of 1s, to make the sets as large as possible • Do NOT circle any sets that contain only d’s. • As usual, cover all 1s, none of 0s.
New Rules for circling sets of 0s(Product-of-Sums simplification) • Allow d’s to be included when circling sets of 0s, to make the sets as large as possible • Do NOT circle any sets that contain only d’s. • As usual, cover all 0s, none of 1s.
Example • Build a logic circuit that determines if a decimal digit is >= 5 • Solution: • The decimal digits(0,1,2,...,9) can be represented by 4 bit BCD code. • The logic circuit should have 4 input variables and one output. • There are 16 different input combinations but only 10 of them are used. • The logic function should produce 0 if the number is <5 , and 1 if it is >= 5
Example - The Truth table • The Truth table for the function is specified as follows:Row W X Y Z F 0 0 0 0 0 0 1 0 0 0 1 0 2 0 0 1 0 0 3 0 0 1 1 0 4 0 1 0 0 0 5 0 1 0 1 1 6 0 1 1 0 1 7 0 1 1 1 1 8 1 0 0 0 1 9 1 0 0 1 1 10 1 0 1 0 d 11 1 0 1 1 d 12 1 1 0 0 d 13 1 1 0 1 d 14 1 1 1 0 d 15 1 1 1 1 d • Maxterm list: F=? • K-Map?
W WX Example - K-Map 00 01 11 10 YZ 0 4 12 8 00 0 0 d 1 1 5 13 9 • The Minimal Sum : • Combining the 1 cells only • the minimal sum is:F = W.X’.Y’+W’.X.Z+W’.X.Y • Combining the don't care minterms d (s) with the 1 cells • The minimal sum is (with using d (s)):F = W+X.Z+X.Y • Exercise: Find the Minimal Product 01 0 1 d 1 Z 3 7 15 11 11 0 1 d d W Y WX 2 6 14 10 10 0 1 d d 00 01 11 10 YZ 0 4 12 8 00 0 0 d 1 X 1 5 13 9 01 0 1 d 1 Z 3 7 15 11 11 0 1 d d Y 2 6 14 10 10 0 1 d d X
Exercise solution • The Minimal Product • F= (W+X).(W+Y+Z) • Which one is better? • The SoP or the PoS? W WX 00 01 11 10 YZ 0 4 12 8 00 0 0 d 1 1 5 13 9 01 0 1 d 1 Z 3 7 15 11 11 0 1 d d Y 2 6 14 10 10 0 1 d d X
W X F Y Z Example- Implementation • The minimal Sum implementation : F = W+X.Z+X.Y • The minimal Product implementation : F= (W+X).(W+Y+Z) • How to choose? W X F Y Z W X F Y Z
Next • Spring Break! • Homework# 5(b) on 3/15 • Quiz 3 on Design and minimization on 3/17. Then we will start Chapter 6. • Test 2 on 3/19. Chapter 4 only. Closed book but only one sheet of Boolean Algebra theorems is allowed.