Docsity

Gate Level Minimization - Design and Analysis - Lecture Notes, Study notes of Digital Systems Design

Toggle sidebar
bg1
1
y
x
y
x
COEN 312 DIGITAL SYSTEMS DESIGN - LECTURE NOTES
Chapter 3: Gate-Level Minimization
NOTE: For more examples and detailed description of the material in the lecture
notes, please refer to the main textbook:
Digital Design 3rd Edition, By Morris Mano, Publisher Prentice Hall, 3rd Edition
All examples used in the lecture notes are from the above reference.
The Map Method
- Minimization of Boolean expressions using the properties of Boolean algebra is not
easy in general because it does not have any specific rules.
- There is a straightforward procedure for minimizing Boolean functions which is
called Karnaugh map or K-map or simply the map method.
- The K-map method produces the simplified expression in a standard form: sum of
products or product of sums.
- K-map for the Boolean expressions with two variables is as follows:
- For example, consider the function yxmF .
31 == .
- The corresponding K-map is as follows:
x y
Minterms
0 0 m0
0 1 m1
1 0 m2
1 1 m3
yโ€™ y
0 1
xโ€™ 0 xโ€™.yโ€™ xโ€™.y
x 1 x.yโ€™ xโ€™.yโ€™
m0 m1
m2 m3
yโ€™ y
0 1
xโ€™ 0 0 0
x 1 0 1
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20

Partial preview of the text

Download Gate Level Minimization - Design and Analysis - Lecture Notes and more Study notes Digital Systems Design in PDF only on Docsity!

y x

y x

COEN 312 DIGITAL SYSTEMS DESIGN - LECTURE NOTES

Chapter 3: Gate-Level Minimization NOTE: For more examples and detailed description of the material in the lecture notes, please refer to the main textbook: Digital Design 3rd Edition, By Morris Mano, Publisher Prentice Hall, 3rd Edition All examples used in the lecture notes are from the above reference.

The Map Method

  • Minimization of Boolean expressions using the properties of Boolean algebra is not easy in general because it does not have any specific rules.
  • There is a straightforward procedure for minimizing Boolean functions which is called Karnaugh map or K-map or simply the map method.
  • The K-map method produces the simplified expression in a standard form: sum of products or product of sums.
  • K-map for the Boolean expressions with two variables is as follows:
  • For example, consider the function F 1 (^) = m 3 = x. y.
  • The corresponding K-map is as follows:

x y (^) Minterms 0 0 m 0 0 1 m 1 1 0 m 2 1 1 m 3

y โ€™ y 0 1 x โ€™ 0 x โ€™. y โ€™ x โ€™. y x 1 x. y โ€™ x โ€™. y โ€™

m 0 m 1 m 2 m 3

y โ€™ y 0 1 x โ€™ 0 0 0 x 1 0 1

  • This function cannot be simplified as it has the simplest form.
  • As another example, consider the function F 2 (^) = m 1 + m 2 + m 3 = x '. y + x. y '+ x. y.
  • Using the properties of Boolean algebra, this function can be simplified as F 2 (^) = x + y.
  • This can also be seen from K-map as follows:
  • The function is equal to one in the second row ( x ) and the second column ( y ).
  • K-map for the Boolean expressions with three variables is as follows:
  • Any two adjacent squares in the map differ by only one variable, which is primed in one square and unprimed in the other.
  • This implies that the sum of two minterms in adjacent squares can be simplified to a single AND term.
  • Two adjacent squares can be simplified to a term of two literals.

y โ€™ y 0 1 x โ€™ 0 0 1 x 1 1 1

x โ€™. y โ€™. z โ€™

x. y โ€™. z โ€™

x โ€™. y โ€™. z

x. y โ€™. z

x โ€™. y. z

x. y. z

x โ€™. y. z โ€™

x. y. z โ€™

x^ yz x โ€™

x

z โ€™ z z โ€™

y โ€™ y

m 0 m 4

m 1 m 5

m 3 m 7

m 2 m 6

F ( x , y , z )= โˆ‘( 3 , 4 , 6 , 7 )

  • The map shows that the function can be simplified as F = y. z + x. z '.

Example

  • Simplify the Boolean function

F ( x , y , z )= โˆ‘( 0 , 2 , 4 , 5 , 6 )

  • The map shows that the function can be simplified as F = z ' + x. y '.

x^ yz x โ€™

x

z โ€™ z z โ€™

y โ€™ y

x^ yz x โ€™

x

z โ€™ z z โ€™

y โ€™ y

Example

  • Consider the following Boolean function:

F = A '. C + A '. B + A. B '. C + B. C

  • Find an expression for F as sum of minterms
  • and find an expression with minimum number of terms.
  • It can be seen from the map that the minterms m 1 (^) , m 2 , m 3 , m 5 , m 7 are equal to 1.

- F ( A , B , C )= โˆ‘( 1 , 2 , 3 , 5 , 7 )

  • The map shows that the function can be simplified as F = C + A '. B.

Four-Variable Map

BC

A

A โ€™

A

C โ€™ C C โ€™

B โ€™ B

  • The map shows that the function can be simplified as F = y ' + w '. z '+ x. z '.
  • The number of groupings is equal to the number of terms in the simplified expression.
  • It is preferable to group as many squares as possible because it reduces the number of literals in each term.
  • For example, although the left middle rows and left top rows have been grouped with the eight left squares, we grouped them again with the corresponding right columns to make a bigger group which means a smaller number of literals in the corresponding terms.

Example

  • Simplify the following Boolean function

F = A '. B '. C '+ B '. C. D '+ A '. B. C. D '+ A. B '. C '

yz wx 00

z โ€™ z z โ€™

y โ€™ y

x โ€™

x โ€™

x

w โ€™

w

  • The map shows that the function can be simplified as F = B '. D '+ B '. C '+ A '. C. D '.

Example

  • Simplify the following Boolean function:

F ( A , B , C , D )= โˆ‘( 0 , 2 , 3 , 5 , 7 , 8 , 9 , 10 , 11 , 13 , 15 )

  • This function has several minterms and they can be grouped in different ways as follows:

CD

AB

D โ€™ D D โ€™

C โ€™ C

B โ€™

B โ€™

B

A โ€™

A

  • Simplified function: F = B. D + B '. D '+ B '. C + A. D
  • Simplified function: F = B. D + B '. D '+ A. D + C. D

CD

AB

D โ€™ D D โ€™

C โ€™ C

B โ€™

B โ€™

B

A โ€™

A

CD

AB

D โ€™ D D โ€™

C โ€™ C

B โ€™

B โ€™

B

A โ€™

A

  • The four simplified expressions are not similar but the corresponding Boolean functions are equivalent.
  • Each simplified expression has 4 product terms and 8 literals.
  • When several groupings are available, one should be careful to avoid redundant terms.
  • For example, the functions

F 1 = B. D + B '. D '+ A. D + C. D + A. B '

F 2 = B. D + B '. D '+ A. D + C. D + B '. C

F 3 = B. D + B '. D '+ A. B '+ A. D + B '. C

F 4 = B. D + B '. D '+ A. B '+ C. D + B '. C

F 5 = B. D + B '. D '+ A. D + C. D + A. B '+ B '. C

all have redundant terms as some groupings contain the squares that all of them have already been covered by other groupings.

  • Two of the groupings (corresponding to B. D , B '. D ') appear in all four cases as they

contain a minterm ( m 0 and m 5 ) that is not covered by any other groups.

Definition:

  • A product term obtained by combining the maximum possible number of adjacent squares in the map is called a prime implicant.
  • A prime implicant is called essential if at least one of the minterms covered by it is not covered by any other prime implicant.
  • When simplifying a function that has some non-essential prime implicants, one must be careful not to include redundant terms.

Five-Variable Map

  • The five-variable map consists of 2 four-variable maps as shown below.

F ( A , B , C , D , E )= โˆ‘( 0 , 2 , 4 , 6 , 9 , 13 , 21 , 23 , 25 , 29 , 31 )

  • The map shows that the function can be simplified as F = A '. B '. E '+ B. D '. E + A. C. E (the grouping of adjacent squares of left-half map and right-half map is indicated by double lines).

Product of Sums Simplification

  • To minimize a function in the form of product of sums, one can minimize the complement of the function in the form of sum of products and use DeMorganโ€™s theorem.

DE

BC

E โ€™ E E โ€™

D โ€™ D

B โ€™

B

A โ€™

E โ€™ E E โ€™

D โ€™ D

C โ€™

C โ€™

C

A

Example

  • Simplify the following Boolean function first in sum of products and then in product of sums.

F ( A , B , C , D )= โˆ‘( 0 , 1 , 2 , 5 , 8 , 9 , 10 )

  • Using the following K-map for F , we will have F = B '. D '+ B '. C '+ A '. C '. D
  • To simplify F as product of sums, we will use the following map for the

complement of F which is equal to F ' ( A , B , C , D )= โˆ‘( 3 , 4 , 6 , 7 , 11 , 12 , 13 , 14 , 15 ).

  • The simplified function for F ' in sum of products will be equal to F ' = A. B + C. D + B. D '.
  • Using DeMorganโ€™s theorem, we will have F = ( A '+ B ').( C '+ D ').( B '+ D ) which is

expressed as product of sums.

CD

AB

D โ€™ D D โ€™

C โ€™ C

B โ€™

B โ€™

B

A โ€™

A

  • Both expressions are in standard forms and the implementation of a function in a standard form is always a two-level implementation.
  • To enter a function expressed in product of sums in the map, use DeMorganโ€™s theorem to express the complement of the function, enter the complement function in the map and then replace all 0โ€™s with 1โ€™s and all 1โ€™s with 0โ€™s.

Example

  • Find the K-map corresponding to the Boolean function F = ( A '+ B '+ C ').( B + D ).
  • Using DeMorganโ€™s theorem, we will have F ' = A. B. C + B '. D 'with the following map:

A โ€™

B โ€™

C โ€™

D โ€™

D

F

CD

AB

D โ€™ D D โ€™

C โ€™ C

B โ€™

B โ€™

B

A โ€™

A

  • The map for F can then be obtained by inverting the values of the above map as follows:

Donโ€™t-Care Conditions

  • Sometimes it is not important to assign 0 or 1 to some minterms.
  • For example, when we use four-bit binary code for the decimal numbers, there will be six extra combinations that are unspecified.
  • The unspecified minterms of a function are called donโ€™t-care conditions and are denoted by an X in the K-map.
  • We can use either 0 or 1 for a donโ€™t-care condition depending on which one gives the simplest expression for the corresponding Boolean function.

Example

  • It is desired to simplify the following Boolean function

CD

AB

D โ€™ D D โ€™

C โ€™ C

B โ€™

B โ€™

B

A โ€™

A

  • Simplified function: F = y. z + w '. x '
  • Simplified function: F = y. z + w '. x '
  • The only difference between the two simplified expressions is in the value of F for the donโ€™t-care minterms.
  • To find the K-map of the complement of F , one should change 0โ€™s to 1โ€™s and 1โ€™s to 0โ€™s in the K-map of F and all donโ€™t-care terms of F will be donโ€™t-care terms of F ' too.

NAND and NOR Implementation

  • NAND and NOR gates are easier to fabricate and are the basic gates used in all IC digital logic families.
  • The NAND gate and NOR gate are called universal gates because any digital system can be implemented with each one of them.
  • We will first consider NAND circuits.
  • The AND and OR operations can be achieved through a NAND gate as follows:

X

X 1

1 X

yz wx 00

z โ€™ z z โ€™

y โ€™ y

x โ€™

x โ€™

x

w โ€™

w

  • The complement operation is obtained simply from a one-input NAND gate (it can also be obtained from a two input NAND gate by connecting both inputs to the variable to be complemented, or by connecting one of the inputs to 1).
  • To implement a standard form Boolean expression with NAND gate, we will use the following invert-OR gate
  • The previous symbol for NAND gate is in fact an AND-invert symbol (each bubble denotes a complementation).
  • One can use a two-level implementation with AND and OR gates and change it to an implementation with NAND gates in a very simple way.
  • For example consider the Boolean function F = A. B + C. D.
  • The implementation of this function with NAND gates can be obtained from the implementation with AND and OR gates as follows:

x y x. y

x

y

x + y

x โ€™+ y โ€™+ z โ€™=( x. y. z )โ€™

x y z