Download as pdf or txt
Download as pdf or txt
You are on page 1of 27

Combinational Design

Sukree Sinthupinyo
Department of Computer Science

Thammasat University

Sukree Sinthupinyo, January 7, 2007 Combinational Design - p. 1/25


Minimal Two-level Forms
● Example
● Minimal Two-level Forms
● Algebraic Minimization
● Two-level Minimization
Problem
● Prime Implicants
● Prime Implicants (cont.)
● Prime Implicates Minimal Two-level Forms
● Minimal Two-level Forms

The K-Map Method

Sukree Sinthupinyo, January 7, 2007 Combinational Design - p. 2/25


Example

Minimal Two-level Forms


● Example
■ Consider the four-variable function z1 (a, b, c, d) which is
● Minimal Two-level Forms
● Algebraic Minimization
defined as 1 if and only if at least two of its inputs are 1
● Two-level Minimization
Problem
■ The input combinations that make z1 = 1 are 0011, 0101,
● Prime Implicants
● Prime Implicants (cont.)
0110, 0111, 1001, 1010, 1011, 1100, 1101, 1110, and 1111.
● Prime Implicates
● Minimal Two-level Forms ■ z1 = Σ(3, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15)
The K-Map Method ■ z1 = Π(0, 1, 2, 4, 8)

Sukree Sinthupinyo, January 7, 2007 Combinational Design - p. 3/25


Minimal Two-level Forms

Minimal Two-level Forms


● Example
■ We can express z1 from the previous slide as
● Minimal Two-level Forms
● Algebraic Minimization
● Two-level Minimization
z1 (a, b, c, d) = ab + ac + ad + bc + bd + cd
Problem
● Prime Implicants
● Prime Implicants (cont.)
■ Five fewer gates in an AND-OR implementation and the AND
● Prime Implicates
● Minimal Two-level Forms
gates are much smaller because their fan-in is reduced from
The K-Map Method
four to two.
■ We can turn into NAND-NAND realization

ab + ac + ad + bc + bd + cd = (ab)(ac)(ad)(bc)(bd)(cd)

Sukree Sinthupinyo, January 7, 2007 Combinational Design - p. 4/25


Algebraic Minimization

Minimal Two-level Forms


● Example
■ Minimization Theorem
● Minimal Two-level Forms
● Algebraic Minimization
Let E be any Boolean expression and x a variable; then
● Two-level Minimization (a) Ex + E x̄ = E and (b) (E + x)(E + x̄) = E
Problem
● Prime Implicants
● Prime Implicants (cont.)
● Prime Implicates
● Minimal Two-level Forms

The K-Map Method

Sukree Sinthupinyo, January 7, 2007 Combinational Design - p. 5/25


Algebraic Minimization

Minimal Two-level Forms


● Example
■ Minimization Theorem
● Minimal Two-level Forms
● Algebraic Minimization
Let E be any Boolean expression and x a variable; then
● Two-level Minimization (a) Ex + E x̄ = E and (b) (E + x)(E + x̄) = E
Problem
● Prime Implicants
● Prime Implicants (cont.)
■ Example
● Prime Implicates
◆ z2 (a, b, c) = Σ(0, 1, 2, 3, 7) = āb̄c̄ + āb̄c + ābc̄ + ābc + abc
● Minimal Two-level Forms

The K-Map Method

Sukree Sinthupinyo, January 7, 2007 Combinational Design - p. 5/25


Algebraic Minimization

Minimal Two-level Forms


● Example
■ Minimization Theorem
● Minimal Two-level Forms
● Algebraic Minimization
Let E be any Boolean expression and x a variable; then
● Two-level Minimization (a) Ex + E x̄ = E and (b) (E + x)(E + x̄) = E
Problem
● Prime Implicants
● Prime Implicants (cont.)
■ Example
● Prime Implicates
◆ z2 (a, b, c) = Σ(0, 1, 2, 3, 7) = āb̄c̄ + āb̄c + ābc̄ + ābc + abc
● Minimal Two-level Forms

The K-Map Method ■ We’ll get


z2 = (āb̄c̄ + āb̄c) + (ābc̄ + ābc) + abc
z2 = (āb̄c̄ + āb̄c) + (ābc̄ + ābc) + (ābc + abc)
z2 = āb̄ + āb + bc
z2 = (āb̄ + āb) + bc
z2 = ā + bc

Sukree Sinthupinyo, January 7, 2007 Combinational Design - p. 5/25


Two-level Minimization Problem

Minimal Two-level Forms


● Example
■ Given a Boolean function z(x1 , x2 , . . . , xn ), determine an
● Minimal Two-level Forms
● Algebraic Minimization
SOP and POS expression E for z that (1) contains the
● Two-level Minimization minimum number of product terms (in the SOP case) or sum
Problem
● Prime Implicants
● Prime Implicants (cont.)
terms (in the POS case), and (2) is such that no expression
● Prime Implicates for z containing the minimum number of terms has fewer
● Minimal Two-level Forms
literals.
The K-Map Method

Sukree Sinthupinyo, January 7, 2007 Combinational Design - p. 6/25


Prime Implicants

Minimal Two-level Forms


● Example
■ Let p(x) be a product term. If for the function z(X), the
● Minimal Two-level Forms
● Algebraic Minimization
relationship
● Two-level Minimization for all A such that p(A) = 1, z(A) = 1
Problem
● Prime Implicants
● Prime Implicants (cont.)
■ Every product term that appears in an SOP expression for z
● Prime Implicates
● Minimal Two-level Forms
is an implicant of z.
The K-Map Method ■ For example, ab, bc, and ab̄c are all implicants of z4 , where
z4 = ab + bc + ab̄c
■ Other implicants of z4 that do not appear in the above
expression are its remaining three minterms ābc, abc̄, and
abc, the nonminterm ac, and others.

Sukree Sinthupinyo, January 7, 2007 Combinational Design - p. 7/25


Prime Implicants (cont.)

Minimal Two-level Forms


● Example
■ An implicant p of z is called a prime implicant if any product
● Minimal Two-level Forms
● Algebraic Minimization
term obtained by deleting a literal from p is not an implicant
● Two-level Minimization of z.
Problem
● Prime Implicants
● Prime Implicants (cont.)
■ For example, the implicant ab is a prime implicant of z4
● Prime Implicates
● Minimal Two-level Forms
because neither of the terms a or b obtained by deleting a
The K-Map Method
literal from ab implies z4

Sukree Sinthupinyo, January 7, 2007 Combinational Design - p. 8/25


Prime Implicates

Minimal Two-level Forms


● Example
■ A sum term s that satisfies the relation
● Minimal Two-level Forms
● Algebraic Minimization
for all A such that s(A) = 0, z(A) = 0
● Two-level Minimization
Problem
■ is called an implicate of z
● Prime Implicants
● Prime Implicants (cont.)
● Prime Implicates
● Minimal Two-level Forms

The K-Map Method

Sukree Sinthupinyo, January 7, 2007 Combinational Design - p. 9/25


Minimal Two-level Forms

Minimal Two-level Forms


● Example
■ In order to obtain a minimal two-level implementation of an
● Minimal Two-level Forms
● Algebraic Minimization
n-variable function z, we need to determine the smallest set
● Two-level Minimization of prime implicants (or implicates) whose sum (or product)
Problem
● Prime Implicants
● Prime Implicants (cont.)
specifies z.
● Prime Implicates
● Minimal Two-level Forms

The K-Map Method

Sukree Sinthupinyo, January 7, 2007 Combinational Design - p. 10/25


Minimal Two-level Forms

The K-Map Method


● Karnaugh Maps
● Cell Grouping
● K-maps for up to Four
Variables
● K-maps for up to Four
Variables (cont.)
● Minimization
The K-Map Method
● Prime Implicant Identification
● One-Cell Groups
● Two-Cell Groups
● Larger Groups
● Prime Implicant Covers
● Essential Prime Implicants
● Petricks’ Method
● Petricks’ Method (cont)
● Five-Variable K-Map

Sukree Sinthupinyo, January 7, 2007 Combinational Design - p. 11/25


Karnaugh Maps

Minimal Two-level Forms ■ A K-map for short is a modified truth table intended to allow
The K-Map Method
● Karnaugh Maps
minimal SOP and POS expressions.
● Cell Grouping
● K-maps for up to Four
■ First described by Maurice Karnaugh of AT&T Bell
Variables
● K-maps for up to Four Laboratories in the 1950s.
Variables (cont.)
● Minimization ■ One map cell corresponds to a row in the truth table.
● Prime Implicant Identification
● One-Cell Groups
● Two-Cell Groups
■ Also, one map cell corresponds to a minterm or a maxterm
● Larger Groups
● Prime Implicant Covers
in the boolean expression.
● Essential Prime Implicants
● Petricks’ Method
■ A cell that contains a 1 is referred to as a 1-cell; a cell that
● Petricks’ Method (cont)
● Five-Variable K-Map
contains a 0 is a 0-cell
■ Every 1-cell of K-map corresponds to a minterm of z.
Similarly, every 0-cell corresponds to a maxterm of z.

Sukree Sinthupinyo, January 7, 2007 Combinational Design - p. 12/25


Cell Grouping

Minimal Two-level Forms


■ The group of 2k 1-cells or 0-celss on the K-map for z will be
The K-Map Method
● Karnaugh Maps
clustered together.
● Cell Grouping
● K-maps for up to Four
■ The largest groups correspond to the prime implicants or
Variables
● K-maps for up to Four implicates of z
Variables (cont.)
● Minimization
● Prime Implicant Identification
● One-Cell Groups
● Two-Cell Groups
● Larger Groups
● Prime Implicant Covers
● Essential Prime Implicants
● Petricks’ Method
● Petricks’ Method (cont)
● Five-Variable K-Map

Sukree Sinthupinyo, January 7, 2007 Combinational Design - p. 13/25


K-maps for up to Four Variables

Minimal Two-level Forms ■ The figure shows K-maps for two-, three-, and four-variable
The K-Map Method
● Karnaugh Maps
functions
● Cell Grouping
● K-maps for up to Four
Variables
● K-maps for up to Four
Variables (cont.)
● Minimization
● Prime Implicant Identification
● One-Cell Groups
● Two-Cell Groups
● Larger Groups
● Prime Implicant Covers
● Essential Prime Implicants
● Petricks’ Method
● Petricks’ Method (cont)
● Five-Variable K-Map

Sukree Sinthupinyo, January 7, 2007 Combinational Design - p. 14/25


K-maps for up to Four Variables (cont.)

Minimal Two-level Forms

The K-Map Method


● Karnaugh Maps
● Cell Grouping
● K-maps for up to Four
Variables
● K-maps for up to Four
Variables (cont.)
● Minimization
● Prime Implicant Identification
● One-Cell Groups
● Two-Cell Groups
● Larger Groups
● Prime Implicant Covers
● Essential Prime Implicants
● Petricks’ Method
● Petricks’ Method (cont)
● Five-Variable K-Map

Sukree Sinthupinyo, January 7, 2007 Combinational Design - p. 15/25


Minimization

Minimal Two-level Forms ■ Identify all prime implicants of z by encircling appropriate


The K-Map Method
● Karnaugh Maps
maximum sized groups of 2k 1-cells of M , where 1 ≤ k ≤ n
● Cell Grouping
● K-maps for up to Four
■ Select a minimum set of prime implicant groups that contain
Variables
● K-maps for up to Four or cover all 1-cells of z. Where several such sets exist, select
Variables (cont.)
● Minimization one that has the lowest total connection (literal) cost.
● Prime Implicant Identification
● One-Cell Groups
● Two-Cell Groups
● Larger Groups
● Prime Implicant Covers
● Essential Prime Implicants
● Petricks’ Method
● Petricks’ Method (cont)
● Five-Variable K-Map

Sukree Sinthupinyo, January 7, 2007 Combinational Design - p. 16/25


Prime Implicant Identification

Minimal Two-level Forms


■ A product term is represented on a K-map by a group of 2k
The K-Map Method
● Karnaugh Maps
1-cells, called a product group
● Cell Grouping
● K-maps for up to Four
■ The product groups contain n − k literals.
Variables
● K-maps for up to Four
Variables (cont.)
■ A prime implicant is a product group that is not contained in
● Minimization
● Prime Implicant Identification
amy larger product group.
● One-Cell Groups
● Two-Cell Groups
● Larger Groups
● Prime Implicant Covers
● Essential Prime Implicants
● Petricks’ Method
● Petricks’ Method (cont)
● Five-Variable K-Map

Sukree Sinthupinyo, January 7, 2007 Combinational Design - p. 17/25


One-Cell Groups

Minimal Two-level Forms ■ 1-cells define a prime implicant that is also a minterm of z.
The K-Map Method
● Karnaugh Maps
■ Expressed as a product of n = 4 literals
● Cell Grouping
● K-maps for up to Four
Variables
● K-maps for up to Four
Variables (cont.)
● Minimization
● Prime Implicant Identification
● One-Cell Groups
● Two-Cell Groups
● Larger Groups
● Prime Implicant Covers
● Essential Prime Implicants
● Petricks’ Method
● Petricks’ Method (cont)
● Five-Variable K-Map

Sukree Sinthupinyo, January 7, 2007 Combinational Design - p. 18/25


Two-Cell Groups

Minimal Two-level Forms ■ Formed from a pair of 1-cells.


The K-Map Method
● Karnaugh Maps
■ Each such pair is specified by a product of n − 1 = 3 literals.
● Cell Grouping
● K-maps for up to Four
Variables
● K-maps for up to Four
Variables (cont.)
● Minimization
● Prime Implicant Identification
● One-Cell Groups
● Two-Cell Groups
● Larger Groups
● Prime Implicant Covers
● Essential Prime Implicants
● Petricks’ Method
● Petricks’ Method (cont)
● Five-Variable K-Map

Sukree Sinthupinyo, January 7, 2007 Combinational Design - p. 19/25


Larger Groups

Minimal Two-level Forms ■ Prime implicants might be formed by groups of four or eight
The K-Map Method
● Karnaugh Maps
1 cells.
● Cell Grouping
● K-maps for up to Four
Variables
● K-maps for up to Four
Variables (cont.)
● Minimization
● Prime Implicant Identification
● One-Cell Groups
● Two-Cell Groups
● Larger Groups
● Prime Implicant Covers
● Essential Prime Implicants
● Petricks’ Method
● Petricks’ Method (cont)
● Five-Variable K-Map

Sukree Sinthupinyo, January 7, 2007 Combinational Design - p. 20/25


Prime Implicant Covers

Minimal Two-level Forms ■ Once all prime implicants of the function z are known, the
The K-Map Method
● Karnaugh Maps
problem is to select a suitable subset α of these prime
● Cell Grouping
● K-maps for up to Four
implicants whose OR-sum specifies z.
Variables
● K-maps for up to Four
■ In K-map terms, the cell groups that form α is said to form a
Variables (cont.)
● Minimization prime implicant cover of z.
● Prime Implicant Identification
● One-Cell Groups ■ If α is a cover with the minimum numober of prime
● Two-Cell Groups
● Larger Groups implicants, and also has the fewest literals among all such
● Prime Implicant Covers
● Essential Prime Implicants covers, the α is a minimal cover of z.
● Petricks’ Method
● Petricks’ Method (cont)
● Five-Variable K-Map

Sukree Sinthupinyo, January 7, 2007 Combinational Design - p. 21/25


Essential Prime Implicants

Minimal Two-level Forms ■ A prime implicant is said to be an essential prime implicant


The K-Map Method
● Karnaugh Maps
if and only of it convers some 1-cell or minterm mij that is
● Cell Grouping
● K-maps for up to Four
not coverd by any other prime implicant of z.
Variables
● K-maps for up to Four ■ The first tep in finding a minimal cover is to identify all
Variables (cont.)
● Minimization essential prime implicants.
● Prime Implicant Identification
● One-Cell Groups
● Two-Cell Groups
● Larger Groups
● Prime Implicant Covers
● Essential Prime Implicants
● Petricks’ Method
● Petricks’ Method (cont)
● Five-Variable K-Map

Sukree Sinthupinyo, January 7, 2007 Combinational Design - p. 22/25


Petricks’ Method

Minimal Two-level Forms ■ Systematic, nonexhaustive way of finding minimum price.


The K-Map Method
● Karnaugh Maps
■ Consider the following four-variable function
● Cell Grouping
● K-maps for up to Four
Variables z1 (a, b, c, d) = Σ(1, 3, 5, 10, 11, 12, 13, 14, 15)
● K-maps for up to Four
Variables (cont.)
● Minimization
● Prime Implicant Identification
■ Three minterm M = {m1 , m2 , m3 } and four inessential prime
● One-Cell Groups implicants P = {P1,3 , P1,5 , P5,13 , P3,11
● Two-Cell Groups
● Larger Groups
● Prime Implicant Covers
■ Covering proposition:
● Essential Prime Implicants A cover C of M by P must contain P1,3 or P1,5 to cover
● Petricks’ Method
● Petricks’ Method (cont) m1 , and it must contain P1,3 or P3,11 to cover m3 , and it must
● Five-Variable K-Map
contain P1,5 or P5,13 to cover m5 .

Sukree Sinthupinyo, January 7, 2007 Combinational Design - p. 23/25


Petricks’ Method (cont)

Minimal Two-level Forms ■ From the previous slide, we can write:


The K-Map Method
● Karnaugh Maps
● Cell Grouping
C =(P1,3 + P1,5 )(P1,3 + P3,11 )(P1,5 + P5,13 )
● K-maps for up to Four
Variables
● K-maps for up to Four
C =P1,3 P1,3 P1,5 + P1,3 P1,3 P5,13 + P1,3 P3,11 P1,5 + P1,3 P3,11 P5,13
Variables (cont.)
● Minimization + P1,5 P1,3 P1,5 + P1,5 P1,3 P5,13 + P1,5 P3,11 P1,5 + P1,5 P3,11 P5,13
● Prime Implicant Identification
● One-Cell Groups
● Two-Cell Groups
C =P1,3 P1,5 + P1,3 P5,13 + P1,3 P3,11 P5,13 + P1,3 P3,11 P5,13
● Larger Groups
● Prime Implicant Covers + P1,5 P1,3 P5,13 + P1,5 P3,11 + P1,5 P3,11 P5,13
● Essential Prime Implicants
● Petricks’ Method
● Petricks’ Method (cont) ■ Hence, three possible minimal covers of M = m1 , m3 , m5 :
● Five-Variable K-Map
{P1,3 , P1,5 }, {P1,3 , P5,13 }, and {P1,5 , P3,11 }

Sukree Sinthupinyo, January 7, 2007 Combinational Design - p. 24/25


Five-Variable K-Map

Minimal Two-level Forms

The K-Map Method


● Karnaugh Maps
● Cell Grouping
● K-maps for up to Four
Variables
● K-maps for up to Four
Variables (cont.)
● Minimization
● Prime Implicant Identification
● One-Cell Groups
● Two-Cell Groups
● Larger Groups
● Prime Implicant Covers
● Essential Prime Implicants
● Petricks’ Method
● Petricks’ Method (cont)
● Five-Variable K-Map

Sukree Sinthupinyo, January 7, 2007 Combinational Design - p. 25/25

You might also like