Chapter 3 GateLevel Minimization Part 1 Origionally By
Chapter 3: Gate-Level Minimization Part 1 Origionally By Reham S. Al-Majed Imam Muhammad Bin Saud University
Outline q Introduction q The Map Method Two-Variable Map � Three Variable Map � q Four variable Map � q Prime implicant Product – of – Sum simplification 2
3. 1 Introduction q The complexity of digital logic gates depends on the complexity of the corresponding Boolean function. q Gate-level minimization: finding an optimal gate-level implementation of the Boolean functions that describing circuits. q Boolean expression may be simplified by: � Boolean Algebra � lack specific rules for each succeeding step. � Map method ( See next slides) � Synthesis tools � Efficient and quick 3
3. 2 The Map Method q Simple and straightforward q Pictorial form of a truth table q Known as the Karnaugh map or k-map. q Made up of squares An n-variable K-map has 2 n squares/cells. � Each square represents one minterm. � Square’s value corresponds to one value in truth table. � Mark with 1 the squares at which the function minterms produce 1. � Any two adjacent squares in the map differ by only one variable Gray Code � � Uppermost cells are adjacent to the lowermost cells! � The leftmost cells are adjacent to the rightmost cells! 4
Two-variable Map Representation q Four rows in truth table q Four minterms four squares in the map q Example: consider the boolean function q Mark square correspond to m 3 with 1 q Row 1 x unprimed , column 1 y unprimed x y f Minterm 0 0 0 m 0 x’ y’ 0 1 0 m 1 x’ y 1 0 0 m 2 x y’ 1 1 1 m 3 xy 5 f = x. y
Three-variable Map Representation q Eight minterms eight squares q Minterms are arranged in Gray code not in a binary sequence ! q � Check adjacency of leftmost and rightmost cells (m 0 -m 2 , m 4 -m 6) � Try to use (+) between any two, four, eight squares ? For convenience, variable is written under squares in which it is unprimed. 6
Minimization by K-map Steps: 1. Mark the K-map with 1 s in each minterm that represents the function. 2. Group the adjacent marked squares. • Groups must contain power of 2 (e. g. 2, 4, 8) ones. • Grouping can be side to side or top to bottom but not diagonally. • It is desirable to use the same minterm with other groups (if adjacent). • The goal is to find the fewest number of groups combine the maximum number of adjacent squares. 3. Analyze each group to find the term it represents. 4. Write the minimized Boolean expression by OR-ing the terms of the groups. 7
Example 1 q Express the Boolean function from the truth table and then Simplify using Boolean Algebra & k-map x y f Minterm 0 0 0 m 0 x’ y’ 0 1 1 m 1 x’ y 1 0 1 m 2 x y’ 1 1 1 m 3 xy f = ∑(1, 2, 3) = m 1+m 2+m 3 = x’y +xy’+xy By BA f = x’y +xy’+xy = x’y + x(y’+y) = x’y + x. 1 = (x’+x) (y+x) = 1. y+x =x+y By K-map Both in the same column (y) But different rows cancel each other Both in the same row (x) But different columns cancel each other f=x+y 8
Example 2 q Simplify the function : f(x, y, z) = ∑ (2, 3, 4, 5) y yz 00 01 11 10 1 1 x 0 x 1 1 1 z f = x’y + xy’ 9
Example 3 q Simplify the function : f(x, y, z) = ∑ (0, 2, 4, 5, 6) y yz 00 01 11 x x 0 1 10 1 1 1 z f = z’+xy’ 10
3. 3 Four-Variable Map q 16 minterms 16 squares arranged in Gray code sequence q Concatenate row number with column to obtain minterm. q Remember: the larger combined squares the smaller number of literals in term. 11
Prime Implicants q Prime Implicant: Product term obtained by combining the maximum numbers of adjacent squares. � Single 1 is PI if it is not adjacent to any other 1’s. � Two adjacent 1’s form PI if they aren’t within a group of four. � Four ? � q Essential Prime Implicant: � � If a minterm in a square is covered by only one prime implicant. Look at each 1 and check the number of PIs that cover it � If q only one PI it is EPI Example: F(A, B, C, D) = ∑ ( 0, 2, 3, 5, 7, 8, 9, 10, 11, 13, 15) 13
3. 5 Product – of – Sums Simplification q The 1’s represent minterms of the function. q The minterms not included in So. P represent complement of the function. q Mark empty squares by 0’s and group them obtain the simplified expression of the complement of the function. q Apply De. Morgan’s theorem The function will be in product of sums. 14
Example q Simplify the following Boolean function into So. P and Po. S : F(A, B, C, D)= ∑ (0, 1, 2, 5, 8, 9, 10) � So. P � Mark 1’s � Combine squares marked with 1’s � F= B’D’ + B’C’ + A’C’D � Po. S � Mark 0’s � Combine squares marked with 0’s obtain simplified complement of F � F’ = AB + CD + BD’ � Apply De. Morgan’s theorem � F= (A’+B)(C’+D’)(B’+D) 15
Exercise q Simplify the boolean function into Sum-of-Product F(x, y, z) = ∏ ( 0, 2, 5, 7) 16
- Slides: 16