Computer Architecture I:
This presentation is the property of its rightful owner.
Sponsored Links
1 / 103

Computer Architecture I: Digital Design Dr. Robert D. Kent PowerPoint PPT Presentation


  • 65 Views
  • Uploaded on
  • Presentation posted in: General

Computer Architecture I: Digital Design Dr. Robert D. Kent. Lecture 3 Simplification of Boolean Expressions. Simplification of Boolean Expressions. A. Cost Models B. Reduction Techniques - i. Karnaugh Map Method. The Simplification Problem: Requirements.

Download Presentation

Computer Architecture I: Digital Design Dr. Robert D. Kent

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Computer architecture i digital design dr robert d kent

Computer Architecture I: Digital Design

Dr. Robert D. Kent

Lecture 3

Simplification of Boolean Expressions


Simplification of boolean expressions

SimplificationofBoolean Expressions

A. Cost Models

B. Reduction Techniques -

i. Karnaugh Map Method


The simplification problem requirements

The Simplification Problem: Requirements

  • Simplification of complex circuits, starting from their equivalent representation as complex Boolean expressions, requires an understanding of cost.

  • We will see that the typical goal is to arrive at Boolean expressions that:

    • are expressible in SOP (or POS) form

    • involve minimal numbers of literals

    • involve a minimal number of gate application levels

  • To help us understand how to accomplish circuit minimization, we will study one powerful reduction technique:

    • Karnaugh maps


Concepts of cost

Concepts of Cost

  • We focus on two types of cost model.

  • Minimum time of completion of circuit logic

    • both SOP and POS circuit representations are two-level designs with all the gates at each level performing in parallel with the same time characteristics.

  • Minimum cost of circuit construction

    • very often it is possible, starting with the SOP or POS forms, to rewrite a near-optimal cost form involving pure nand or nor gates only.

  • This leads to four cost theorems.


Concepts of cost1

Concepts of Cost

  • Before stating the theorems we need some definitions of terms:

    • Literala variable or its complement (unique symbol)

    • ImpliesF implies G, means that there does not exist a set of N input literals such that both F=1 and G=0; By contrast, if F=1 then G must be equal to 1.

    • SubsumesA term T1subsumes a term T2if and only if (!)all the literals in T2 are also found in T1.If one term subsumes another in an expression, then the subsuming term can always be deleted with changing the function. In other words, if T1 subsumes T2 then T1 may be ignored because the T2 terms account for logic.


Concepts of cost2

Concepts of Cost

  • … and some more definitions of terms:

    • Implicanta product term is said to be an implicant of a complete function if the product term impliesthe function.

    • Implicatea sum term is said to be an implicate of a complete function if the sum term impliesthe function.


Concepts of cost3

Concepts of Cost

  • … and some more definitions of terms:

    • Prime Implicantan implicant is a prime implicant if it does not subsume any other implicant with fewer literals.This means that if any literal is removed from the term, it no longer implies the function.

    • Prime Implicatean implicate is a prime implicate if it does not subsume any other implicate with fewer literals.This means that if any literal is removed from the term, it no longer implies the function.

Note the symmetry between the definitions of implicant (product) and implicate (sum).


Concepts of cost4

Concepts of Cost

  • Cost Theorem 1a.When the cost, assigned by some criterion, for a minimal Boolean formula is such that decreasing the number of literals in the disjunctive normal formula does not increase the cost of the formula, there is at least one minimal disjunctive normal formula that corresponds to a sum of prime implicants.

  • Cost Theorem 2a. For any cost criterion such that the cost of a formula does not increase when a literal is removed, at least one minimal disjunctive normal formula describing a function is an irredundantdisjunctive normal formula (SOP).


Concepts of cost5

Concepts of Cost

  • Cost Theorem 1b.When the cost, assigned by some criterion, for a minimal Boolean formula is such that decreasing the number of literals in the conjunctive normal formula does not increase the cost of the formula, there is at least one minimal conjunctive normal formula that corresponds to a product of prime implicates.

  • Cost Theorem 2b. For any cost criterion such that the cost of a formula does not increase when a literal is removed, at least one minimal conjunctive normal formula describing a function is an irredundant conjunctive normal formula (POS).

  • These theorems establish that implicates are dual to implicants.


Expression simplification

Expression Simplification

  • The algebraic techniques we have developed are too slow and uncertain to apply in cases where the numbers of variables are large.

  • To meet the needs of modern circuit analysis and design several methods have been developed that

    • are somewhat scalable, and

    • permit limited degrees of automation (ie. Programmability).


Karnaugh maps

Karnaugh Maps


Karnaugh maps1

Karnaugh Maps

  • The use of mapping, or tableau-based, techniques were developed by Veitch and modified by Karnaugh.

  • We will determine these techniques by studying examples in order to establish the rules for map manipulation.


Karnaugh maps2

Karnaugh Maps

Truth Table

  • 1 variable mapx f(x)0 f(0)1 f(1)


Karnaugh maps3

Karnaugh Maps

Truth Table

  • 1 variable mapx f(x)0 f(0)1 f(1)

Literal

Function Values

Binary Values


Karnaugh maps4

Karnaugh Maps

x0 1

f(0)

f(1)

Truth Table

  • 1 variable mapx f(x)0 f(0)1 f(1)

Literal

Literal

Binary Values

Function Values

Function Values

Binary Values


Karnaugh maps5

Karnaugh Maps

x0 1

f(0)

f(1)

Truth Table

1x2 Karnaugh Map

  • 1 variable mapx f(x)0 f(0)1 f(1)


Karnaugh maps6

Karnaugh Maps

Truth Table

  • 2 variable mapx y f(x,y) 0 0 f(0,0)0 1 f(0,1)1 0 f(1,0)1 1 f(1,1)


Karnaugh maps7

Karnaugh Maps

Truth Table

y0 1

2x2 Karnaugh Map

f(0,0)

f(0,1)

0

x

1

f(1,0)

f(1,1)

  • 2 variable mapx y f(x,y) 0 0 f(0,0)0 1 f(0,1)1 0 f(1,0)1 1 f(1,1)


Karnaugh maps8

Karnaugh Maps

yz00 01 11 10

f(000) f(001) f(011) f(010)

0

x

1

f(100) f(101) f(111) f(110)

2x4 Karnaugh Map

  • 3 variable mapx y z f(x,y,z)0 0 0 f(000)0 0 1 f(001)0 1 0 f(010)0 1 1 f(011)1 0 0 f(100)1 0 1 f(101)1 1 0 f(110)1 1 1 f(111)


Karnaugh maps9

Karnaugh Maps

yz00 01 11 10

f(000) f(001) f(011) f(010)

0

x

1

f(100) f(101) f(111) f(110)

2x4 Karnaugh Map

Note the way that the column indices change by only 1 bit at a time from left to right.

  • 3 variable mapx y z f(x)0 0 0 f(000)0 0 1 f(001)0 1 0 f(010)0 1 1 f(011)1 0 0 f(100)1 0 1 f(101)1 1 0 f(110)1 1 1 f(111)


Karnaugh maps10

Karnaugh Maps

y00 011110

f(000) f(001) f(011) f(010)

0

x

1

f(100) f(101) f(111) f(110)

2x4 Karnaugh Map

An alternative labelling scheme is based on which literal has value 1.

  • 3 variable mapx y z f(x,y,z)0 0 0 f(000)0 0 1 f(001)0 1 0 f(010)0 1 1 f(011)1 0 0 f(100)1 0 1 f(101)1 1 0 f(110)1 1 1 f(111)

z


Karnaugh maps11

Karnaugh Maps

y00 011110

0 1 3 2

0

x

1

4 5 7 6

2x4 Karnaugh Map

One final alternative labelling scheme replaces the function value by the decimal minterm index value.

  • 3 variable mapx y z f(x,y,z)0 0 0 f(000)0 0 1 f(001)0 1 0 f(010)0 1 1 f(011)1 0 0 f(100)1 0 1 f(101)1 1 0 f(110)1 1 1 f(111)

z


Karnaugh maps12

Karnaugh Maps

  • 4 variable mapw x y z f(w,x,y,z)0 0 0 0 f(0000)0 0 0 1 f(0001)0 0 1 0 f(0010)0 0 1 1 f(0011)0 1 0 0 f(0100)0 1 0 1 f(0101)0 1 1 0 f(0110)0 1 1 1 f(0111)1 0 0 0 f(1000)1 0 0 1 f(1001)1 0 1 0 f(1010)1 0 1 1 f(1011)1 1 0 0 f(1100)1 1 0 1 f(1101)1 1 1 0 f(1110)1 1 1 1 f(1111)


Karnaugh maps13

Karnaugh Maps

  • 4 variable mapw x y z f(w,x,y,z)0 0 0 0 f(0000)0 0 0 1 f(0001)0 0 1 0 f(0010)0 0 1 1 f(0011)0 1 0 0 f(0100)0 1 0 1 f(0101)0 1 1 0 f(0110)0 1 1 1 f(0111)1 0 0 0 f(1000)1 0 0 1 f(1001)1 0 1 0 f(1010)1 0 1 1 f(1011)1 1 0 0 f(1100)1 1 0 1 f(1101)1 1 1 0 f(1110)1 1 1 1 f(1111)

yz00 01 11 10

00

01

wx

11

10

f(0000) f(0001) f(0011) f(0010)

f(0100) f(0101) f(0111) f(0110)

f(1100) f(1101) f(1111) f(1110)

f(1000) f(1001) f(1011) f(1010)


Karnaugh maps14

Karnaugh Maps

Note the way that both the row and column indices change by only 1 bit at a time.

  • 4 variable mapw x y z f(w,x,y,z)0 0 0 0 f(0000)0 0 0 1 f(0001)0 0 1 0 f(0010)0 0 1 1 f(0011)0 1 0 0 f(0100)0 1 0 1 f(0101)0 1 1 0 f(0110)0 1 1 1 f(0111)1 0 0 0 f(1000)1 0 0 1 f(1001)1 0 1 0 f(1010)1 0 1 1 f(1011)1 1 0 0 f(1100)1 1 0 1 f(1101)1 1 1 0 f(1110)1 1 1 1 f(1111)

yz00 01 11 10

00

01

wx

11

10

0 1 3 2

4 5 7 6

12 13 15 14

8 9 11 10


Karnaugh maps15

Karnaugh Maps

Note the way that both the row and column indices change by only 1 bit at a time.

This implies that two rows, or columns, whose indices differ by only 1 bit value, are adjacent.

  • 4 variable mapw x y z f(w,x,y,z)0 0 0 0 f(0000)0 0 0 1 f(0001)0 0 1 0 f(0010)0 0 1 1 f(0011)0 1 0 0 f(0100)0 1 0 1 f(0101)0 1 1 0 f(0110)0 1 1 1 f(0111)1 0 0 0 f(1000)1 0 0 1 f(1001)1 0 1 0 f(1010)1 0 1 1 f(1011)1 1 0 0 f(1100)1 1 0 1 f(1101)1 1 1 0 f(1110)1 1 1 1 f(1111)

yz00 01 11 10

00

01

wx

11

10

0 1 3 2

4 5 7 6

12 13 15 14

8 9 11 10


Karnaugh maps16

Karnaugh Maps

Note the way that both the row and column indices change by only 1 bit at a time.

This implies that two rows, or columns, whose indices differ by only 1 bit value, are adjacent.

  • 4 variable mapw x y z f(w,x,y,z)0 0 0 0 f(0000)0 0 0 1 f(0001)0 0 1 0 f(0010)0 0 1 1 f(0011)0 1 0 0 f(0100)0 1 0 1 f(0101)0 1 1 0 f(0110)0 1 1 1 f(0111)1 0 0 0 f(1000)1 0 0 1 f(1001)1 0 1 0 f(1010)1 0 1 1 f(1011)1 1 0 0 f(1100)1 1 0 1 f(1101)1 1 1 0 f(1110)1 1 1 1 f(1111)

yz00 01 11 10

00

01

wx

11

10

0 1 3 2

4 5 7 6

12 13 15 14

8 9 11 10

WRAP-AROUND!


Karnaugh maps17

Karnaugh Maps

An alternative row/column labelling, highlighting the literal with value 1.

  • 4 variable mapw x y z f(w,x,y,z)0 0 0 0 f(0000)0 0 0 1 f(0001)0 0 1 0 f(0010)0 0 1 1 f(0011)0 1 0 0 f(0100)0 1 0 1 f(0101)0 1 1 0 f(0110)0 1 1 1 f(0111)1 0 0 0 f(1000)1 0 0 1 f(1001)1 0 1 0 f(1010)1 0 1 1 f(1011)1 1 0 0 f(1100)1 1 0 1 f(1101)1 1 1 0 f(1110)1 1 1 1 f(1111)

y00 01 11 10

00

01

x

11

10

0 1 3 2

4 5 7 6

12 13 15 14

w

8 9 11 10

z


Karnaugh maps18

Karnaugh Maps

x0 1

0

1

Place function values (from the defining function truth table) in the map positions.

  • Case Study: 1 variable map

  • Ex.


Karnaugh maps19

Karnaugh Maps

x0 1

0

1

  • Case Study: 1 variable map

Circle all 1 entries that, taken together, form a subcube (i.e. rectangular shape formed from 1-boxes, without holes).


Karnaugh maps20

Karnaugh Maps

x0 1

0

1

  • Case Study: 1 variable map

Circle all 1 entries that, taken together, form a subcube (i.e. rectangle).

DEFINITION:

When constructing SOP forms, a 2N -subcube is a rectangular region of a Karnaugh map consisting of 2Nadjacent cells, each containing the same value 1 (or 0 for POS forms), and where N must be an integer greater or equal to zero.


Karnaugh maps21

Karnaugh Maps

x0 1

0

1

  • Case Study: 1 variable map

The entry 1 in the second column corresponds to the prime implicantx.


Karnaugh maps22

Karnaugh Maps

x0 1

0

1

  • Case Study: 1 variable map

The entry 1 in the second column corresponds to the prime implicantx.

Recall that x is a prime implicant iff:

- x implies f(x) and,

- x does not subsume any other implicant: Since, removing x from itself leaves nothing, then x is clearly prime.


Karnaugh maps23

Karnaugh Maps

x0 1

0

1

  • Case Study: 1 variable map

Thus, the minimal expression of the function is:

F(x) = x


Karnaugh maps24

Karnaugh Maps

x0 1

1

0

  • Case Study: 1 variable map - Complementation

The entry 1 in the first column corresponds to the prime implicantx’.


Karnaugh maps25

Karnaugh Maps

x0 1

1

0

  • Case Study: 1 variable map - Complementation

The entry 1 in the first column corresponds to the prime implicantx’.

Thus, the minimal expression of the function is:

F(x) = x’


Karnaugh maps26

Karnaugh Maps

x0 1

1

1

  • Case Study: 1 variable map - 2nd variation

Circle all 1 entries that, taken together, form a subcube (i.e. rectangle).


Karnaugh maps27

Karnaugh Maps

x0 1

1

1

  • Case Study: 1 variable map - 2nd variation

We note that both x and x’ terms are included in the rectangle. Their individual “product” contributions to the SOP expression must be summed (or’ed):

x + x’

But, this reduces to 1.


Karnaugh maps28

Karnaugh Maps

x0 1

1

1

  • Case Study: 1 variable map - 2nd variation

Thus, the minimal expression of the function is:

F(x) = 1


Karnaugh maps29

Karnaugh Maps

x0 1

1

1

  • Case Study: 1 variable map - 2nd variation

Thus, the minimal expression of the function is:

f = 1

In other words, when both 0 and 1 terms appear for a literal referenced within the cells of a subcube, that literal is removed from the implicant corresponding to that subcube, leaving a prime implicant.


Karnaugh maps30

Karnaugh Maps

yz00 01 11 10

0 1 1 0

0

x

1

1 0 1 0

2x4 Karnaugh Map

Place function values (from the defining function truth table) in the map positions.

  • 3 variable map


Karnaugh maps31

Karnaugh Maps

yz00 01 11 10

0 1 1 0

0

x

1

1 0 1 0

  • 3 variable map

  • Circle all 1 entries that, taken together, form a subcube (i.e. rectangle).

  • Start with the largest subcubes, then proceed to smaller subcubes

  • Generally speaking, there will be more than one independent subcube, each reflecting a different prime implicant.


Karnaugh maps32

Karnaugh Maps

yz00 01 11 10

0 1 1 0

0

x

1

1 0 1 0

  • 3 variable map

y’ z’

x

  • For each subcube, write its algebraic expression using the variable name (eg. x) if the box occurs in the row/column for which the variable is 1 – otherwise, if the box occurs in the row/column for which the variable (eg. y,z) is 0, use the complemented variable (ie. y’, z’).


Karnaugh maps33

Karnaugh Maps

yz00 01 11 10

0 1 1 0

0

x

1

1 0 1 0

  • 3 variable map

y’ z’

Collecting literals into a product gives:

xy’z’

x

1-subcubes are expressed using all variable symbols


Karnaugh maps34

Karnaugh Maps

yz00 01 11 10

0 1 1 0

0

x

1

1 0 1 0

  • 3 variable map

z

y+y’=1

x’

Circle all 1 entries that, taken together, form a subcube (i.e. rectangle). Generally speaking, there will be more than one independent subcube, each reflecting a different prime implicant.


Karnaugh maps35

Karnaugh Maps

yz00 01 11 10

0 1 1 0

0

x

1

1 0 1 0

  • 3 variable map

z

y+y’=1

Collecting literals into a product gives:

x’z

x’

Circle all 1 entries that, taken together, form a subcube (i.e. rectangle). Generally speaking, there will be more than one independent subcube, each reflecting a different prime implicant.


Karnaugh maps36

Karnaugh Maps

yz00 01 11 10

0 1 1 0

0

x

1

1 0 1 0

  • 3 variable map

y z

x+x’ = 1

Circle all 1 entries that, taken together, form a subcube (i.e. rectangle). Generally speaking, there will be more than one independent subcube, each reflecting a different prime implicant.


Karnaugh maps37

Karnaugh Maps

yz00 01 11 10

0 1 1 0

0

x

1

1 0 1 0

  • 3 variable map

y z

x+x’ = 1

Collecting literals into a product gives:

yz

Circle all 1 entries that, taken together, form a subcube (i.e. rectangle). Generally speaking, there will be more than one independent subcube, each reflecting a different prime implicant.


Karnaugh maps38

Karnaugh Maps

yz00 01 11 10

0 1 1 0

0

x

1

1 0 1 0

  • 3 variable map

Each subcube (rectangle) corresponds to a prime implicant term.

Gathering all terms in SOP form,

f = xy’z’ + x’z + yz


Karnaugh maps39

Karnaugh Maps

yz00 01 11 10

0 1 1 0

0

x

1

1 0 1 0

  • 3 variable map

f = xy’z’ + x’z + yz


Karnaugh maps40

Karnaugh Maps

yz00 01 11 10

0 1 1 0

0

x

1

1 0 1 0

  • 3 variable map

f = xy’z’ + x’z + yz

Each subcube contains at least one 1-cell that can ONLY be included within that subcube. Such 1-cells are called essential 1-cells and their corresponding prime implicant is called an essential prime implicant.


Karnaugh maps41

Karnaugh Maps

yz00 01 11 10

0 1 1 0

0

x

1

1 0 1 0

  • 3 variable map

f = xy’z’ + x’z + yz

xy’z’ ( xy’z’ )

Essential 1-cell (essential prime implicant).

Each subcube contains at least one 1-cell that can ONLY be included within that subcube. Such 1-cells are called essential 1-cells and their corresponding prime implicant is called an essential prime implicant.


Karnaugh maps42

Karnaugh Maps

yz00 01 11 10

0 1 1 0

0

x

1

1 0 1 0

  • 3 variable map

f = xy’z’ + x’z + yz

x’y’z ( x’z )

Essential 1-cell (essential prime implicant).

Each subcube contains at least one 1-cell that can ONLY be included within that subcube. Such 1-cells are called essential 1-cells and their corresponding prime implicant is called an essential prime implicant.


Karnaugh maps43

Karnaugh Maps

yz00 01 11 10

0 1 1 0

0

x

1

1 0 1 0

  • 3 variable map

f = xy’z’ + x’z + yz

xyz ( yz )

Essential 1-cell (essential prime implicant).

Each subcube contains at least one 1-cell that can ONLY be included within that subcube. Such 1-cells are called essential 1-cells and their corresponding prime implicant is called an essential prime implicant.


Karnaugh maps44

Karnaugh Maps

yz00 01 11 10

1 1 1 1

0

x

1

1 0 0 1

  • 3 variable map - 2nd variation


Karnaugh maps45

Karnaugh Maps

yz00 01 11 10

1 1 1 1

0

x

1

1 0 0 1

  • 3 variable map - 2nd variation

Circle all 1 entries that, taken together, form a subcube (i.e. rectangle) of the largest size, but containing 2N squares (for all possible N).


Karnaugh maps46

Karnaugh Maps

yz00 01 11 10

1 1 1 1

0

x

1

1 0 0 1

  • 3 variable map - 2nd variation

Circle all 1 entries that, taken together, form a subcube (i.e. rectangle) of the largest size, but containing 2N squares (for all possible N).


Karnaugh maps47

Karnaugh Maps

yz00 01 11 10

1 1 1 1

0

x

1

1 0 0 1

  • 3 variable map - 2nd variation

The “wrap-around” technique.

Circle all 1 entries that, taken together, form a subcube (i.e. rectangle) of the largest size, but containing 2N squares (for all possible N).


Karnaugh maps48

Karnaugh Maps

yz00 01 11 10

1 1 1 1

0

x

1

1 0 0 1

  • 3 variable map - 2nd variation

x’[yz + y’z + yz’ + y’z’]

= x’[(y+y’)z + (y+y’)z’]

= x’[z+z’]

= x’

x’y’z’+x’yz’+xy’z’+xyz’

= x’(y’+y)z’ +x(y’+y)z’

= (x’+x)(y’+y)z’

= z’

Circle all 1 entries that, taken together, form a subcube (i.e. rectangle) of the largest size, but containing 2N squares (for all possible N).


Karnaugh maps49

Karnaugh Maps

yz00 01 11 10

1 1 1 1

0

x

1

1 0 0 1

  • 3 variable map - 2nd variation

Collecting literals into a product gives:

x’ + z’

Circle all 1 entries that, taken together, form a subcube (i.e. rectangle) of the largest size, but containing 2N squares (for all possible N).


Karnaugh maps50

Karnaugh Maps

Place function values in the map positions.

  • Case Study: 4 variable map

yz00 01 11 10

00

01

wx

11

10

1 0 0 1

1 1 0 0

1 1 1 0

1 0 1 1


Karnaugh maps51

Karnaugh Maps

Identify 2N subcubes by decreasing N=4,3,2,1,0; using wraparound.

  • Case Study: 4 variable map

yz00 01 11 10

00

01

wx

11

10

1 0 0 1

1 1 0 0

1 1 1 0

1 0 1 1


Karnaugh maps52

Karnaugh Maps

Identify 2N subcubes by decreasing N=4,3,2,1,0; using wraparound.

  • Case Study: 4 variable map

yz00 01 11 10

00

01

wx

11

10

1 0 0 1

There are no subcubes of sizes:

24 =16 or 23 = 8.

1 1 0 0

1 1 1 0

1 0 1 1


Karnaugh maps53

Karnaugh Maps

Identify 2N subcubes by decreasing N=4,3,2,1,0; using wraparound.

  • Case Study: 4 variable map

yz00 01 11 10

00

01

wx

11

10

1 0 0 1

1 1 0 0

Subcubes of size:

22 =4.

1 1 1 0

1 0 1 1


Karnaugh maps54

Karnaugh Maps

Identify 2N subcubes by decreasing N=4,3,2,1,0; using wraparound.

  • Case Study: 4 variable map

yz00 01 11 10

00

01

wx

11

10

1 0 0 1

1 1 0 0

Subcubes of size:

22 =4.

1 1 1 0

1 0 1 1


Karnaugh maps55

Karnaugh Maps

Identify 2N subcubes by decreasing N=4,3,2,1,0; using wraparound.

  • Case Study: 4 variable map

yz00 01 11 10

00

01

wx

11

10

1 0 0 1

1 1 0 0

Subcubes of size:

21 =2.

1 1 1 0

1 0 1 1


Karnaugh maps56

Karnaugh Maps

Identify 2N subcubes by decreasing N=4,3,2,1,0; using wraparound.

  • Case Study: 4 variable map

yz00 01 11 10

00

01

wx

11

10

1 0 0 1

1 1 0 0

Subcubes of size:

21 =2.

1 1 1 0

1 0 1 1


Karnaugh maps57

Karnaugh Maps

Identify 2N subcubes by decreasing N=4,3,2,1,0; using wraparound.

  • Case Study: 4 variable map

yz00 01 11 10

00

01

wx

11

10

1 0 0 1

1 1 0 0

No more subcubes!

1 1 1 0

1 0 1 1


Karnaugh maps58

Karnaugh Maps

Identify 2N subcubes by decreasing N=4,3,2,1,0; using wraparound.

  • Case Study: 4 variable map

yz00 01 11 10

00

01

wx

11

10

1 0 0 1

1 1 0 0

1 1 1 0

Now to identify the prime implicants:

y’z’ + xy’ + x’z’ + wxz + wx’y

1 0 1 1


Karnaugh maps59

Karnaugh Maps

Identify 2N subcubes by decreasing N=4,3,2,1,0; using wraparound.

  • Case Study: 4 variable map

yz00 01 11 10

00

01

wx

11

10

1 0 0 1

1 1 0 0

1 1 1 0

Now to identify the prime implicants:

xy’+ x’z’ + wxz + wx’y

1 0 1 1


Karnaugh maps60

Karnaugh Maps

Identify 2N subcubes by decreasing N=4,3,2,1,0; using wraparound.

  • Case Study: 4 variable map

yz00 01 11 10

00

01

wx

11

10

1 0 0 1

1 1 0 0

1 1 1 0

Now to identify the prime implicants:

xy’ + x’z’+ wxz + wx’y

1 0 1 1


Karnaugh maps61

Karnaugh Maps

Identify 2N subcubes by decreasing N=4,3,2,1,0; using wraparound.

  • Case Study: 4 variable map

yz00 01 11 10

00

01

wx

11

10

1 0 0 1

1 1 0 0

1 1 1 0

Now to identify the prime implicants:

xy’ + x’z’ + wxz+ wx’y

1 0 1 1


Karnaugh maps62

Karnaugh Maps

Identify 2N subcubes by decreasing N=4,3,2,1,0; using wraparound.

  • Case Study: 4 variable map

yz00 01 11 10

00

01

wx

11

10

1 0 0 1

1 1 0 0

1 1 1 0

Now to identify the prime implicants:

xy’ + x’z’ + wxz + wx’y

1 0 1 1


Karnaugh maps63

Karnaugh Maps

Identify 2N subcubes by decreasing N=4,3,2,1,0; using wraparound.

  • Case Study: 4 variable map

yz00 01 11 10

00

01

wx

11

10

1 0 0 1

1 1 0 0

1 1 1 0

Now to identify the prime implicants:

f(w,x,y,z) = xy’ + x’z’ + wxz + wx’y

1 0 1 1


Karnaugh maps64

Karnaugh Maps

  • Using the procedure of identifying the largest possible subcubes in the Karnaugh map first, then dealing with smaller sized subcubes, we arrive at minimal representations of SOP (POS) expressions for the function.

  • These expressions may not be unique, however.


Karnaugh maps65

Karnaugh Maps

Previously, we had presented this example.

  • Case Study: 4 variable map

yz00 01 11 10

00

01

wx

11

10

1 0 0 1

1 1 0 0

1 1 1 0

1 0 1 1

f(w,x,y,z) = xy’ + x’z’ + wxz + wx’y


Karnaugh maps66

Karnaugh Maps

Consider these subcubes ...

  • Case Study: 4 variable map

yz00 01 11 10

00

01

wx

11

10

1 0 0 1

1 1 0 0

1 1 1 0

1 0 1 1

f(w,x,y,z) = xy’ + x’z’ + wxz + wx’y


Karnaugh maps67

Karnaugh Maps

Now, choose the other, alternative subcube containing these 1-cells …

…thereby, minimizing the number of subcubes, hence the number of product terms in the function.

  • Case Study: 4 variable map

yz00 01 11 10

00

01

wx

11

10

1 0 0 1

1 1 0 0

1 1 1 0

1 0 1 1

f(w,x,y,z) = xy’ + x’z’ + wyz+ wx’y


Karnaugh maps68

Karnaugh Maps

Both solutions are equivalent, but the second one is minimal.

  • Case Study: 4 variable map

f(w,x,y,z) = xy’ + x’z’ + wxz + wx’y

f(w,x,y,z) = xy’ + x’z’ + wyz

yz00 01 11 10

00

01

wx

11

10

1 0 0 1

1 1 0 0

1 1 1 0

1 0 1 1


Karnaugh maps summary for sop

Karnaugh Maps – Summary for SOP

  • For a function of N variables (literals) draw the Karnaugh map consisting of 2N cells

    • 1x2, 2x2, 2x4, 4x4, and so on

    • we have not considered the cases of N=5, or 6 (See Textbook).

  • Identify all rectangular subcubes of decreasing subcube size: 2L cells [L=N,N-1,...,1,0], using wraparound if possible.

    • Always seek to minimize the degree of subcube overlap

    • look for essential 1-cells to identify essential prime implicants and minimize the number of subcubes

  • For each subcube, assign a prime implicant algebraic expression term by removing from the full implicant term all literals for which both 0 and 1 row or column labels appear, that is, keep only those literals that do not change.


Karnaugh maps pos

Karnaugh Maps - POS

  • The Karnaugh mapping technique can also be applied to prime implicate (POS) forms.


Karnaugh maps pos1

Karnaugh Maps - POS

  • The Karnaugh mapping technique can also be applied to prime implicate (POS) forms.

  • Instead of grouping 1-cells, we group 0-cells.


Karnaugh maps pos2

Karnaugh Maps - POS

  • The Karnaugh mapping technique can also be applied to prime implicate (POS) forms.

  • Instead of grouping 1-cells, we group 0-cells.

  • For each subcube of 0-cells we assign a sum expression, removing all literals whose row/column indices are both 0 and 1, and listing the literal itself for index label 0, or its complement for index label 1.

    • Review this point with respect to algebraic representations

    • Note the duality relationships


Karnaugh maps pos3

Karnaugh Maps - POS

  • Case Study: 4 variable map

yz00 01 11 10

00

01

wx

11

10

1 0 0 1

1 1 0 0

1 1 1 0

1 0 1 1


Karnaugh maps pos4

Karnaugh Maps - POS

Identify 2N subcubes by decreasing N=4,3,2,1,0; using wraparound.

  • Case Study: 4 variable map

yz00 01 11 10

00

01

wx

11

10

1 0 0 1

1 1 0 0

No subcubes of sizes 16, 8 or 4.

1 1 1 0

1 0 1 1


Karnaugh maps pos5

Karnaugh Maps - POS

Identify 2N subcubes by decreasing N=4,3,2,1,0; using wraparound.

  • Case Study: 4 variable map

yz00 01 11 10

00

01

wx

11

10

1 0 0 1

1 1 0 0

Subcubes of size 2.

1 1 1 0

1 0 1 1


Karnaugh maps pos6

Karnaugh Maps - POS

Identify 2N subcubes by decreasing N=4,3,2,1,0; using wraparound.

  • Case Study: 4 variable map

yz00 01 11 10

00

01

wx

11

10

1 0 0 1

1 1 0 0

1 1 1 0

Note the essential 0-cells that denote essential prime implicates.

1 0 1 1


Karnaugh maps pos7

Karnaugh Maps - POS

Identify 2N subcubes by decreasing N=4,3,2,1,0; using wraparound.

  • Case Study: 4 variable map

yz00 01 11 10

00

01

wx

11

10

1 0 0 1

This subcube contains 0-cells that may be associated with other subcube choices, hence they are not essential 0-cells.

This choice minimizes the number of subcubes.

1 1 0 0

1 1 1 0

1 0 1 1


Karnaugh maps pos8

Karnaugh Maps - POS

Identify 2N subcubes by decreasing N=4,3,2,1,0; using wraparound.

  • Case Study: 4 variable map

yz00 01 11 10

00

01

wx

11

10

1 0 0 1

Note there are no smaller subcubes.

The subcube choices reflect a minimal POS expression.

1 1 0 0

1 1 1 0

1 0 1 1


Karnaugh maps pos9

Karnaugh Maps - POS

Identify 2N subcubes by decreasing N=4,3,2,1,0; using wraparound.

  • Case Study: 4 variable map

yz00 01 11 10

00

01

wx

11

10

1 0 0 1

Note there are no smaller subcubes.

The subcube choices reflect a minimal POS expression.

1 1 0 0

1 1 1 0

1 0 1 1

f(w,x,y,z) = (x+y+z’)(x’+y’+z)(w+y’+z’)


Karnaugh maps69

Karnaugh Maps

  • Case Study: 4 variable map

  • SOP: f(w,x,y,z) = xy’ + x’z’ + wxz

    • the 7 literals provide input to the and gates (operators)

    • the 3 terms provide input to the or gates

    • there are 7+3=10 gate inputs for this expression (circuit)


Karnaugh maps70

Karnaugh Maps

  • Case Study: 4 variable map

  • SOP: f(w,x,y,z) = xy’ + x’z’ + wxz

    • the 7 literals provide input to the and gates (operators)

    • the 3 terms provide input to the or gates

    • there are 7+3=10 gate inputs for this expression (circuit)

  • POS: f(w,x,y,z) = (x+y+z’)(x’+y’+z)(w+y’+z’)

    • the 9 literals provide input to the or gates

    • the 3 terms provide input to the and gates

    • there are 9+3=12 gate inputs for this circuit


Karnaugh maps71

Karnaugh Maps

  • Case Study: 4 variable map

  • SOP: f(w,x,y,z) = xy’ + x’z’ + wxz

    • the 7 literals provide input to the and gates (operators)

    • the 3 terms provide input to the or gates

    • there are 7+3=10 gate inputs for this expression (circuit)

  • POS: f(w,x,y,z) = (x+y+z’)(x’+y’+z)(w+y’+z’)

    • the 9 literals provide input to the or gates

    • the 3 terms provide input to the and gates

    • there are 9+3=12 gate inputs for this circuit

  • CONCLUSION: In this case, the SOP form is a minimal cost circuit expression.


Karnaugh maps72

Karnaugh Maps

  • Sometimes the logic for a circuit function is specified incompletely

    • Some possible inputs may not have a corresponding “fixed” output value

  • What do we do when the client does not care about these special cases

Dealing with apathetic circuit specification

The case of Don’t Care Conditions


Karnaugh maps73

Karnaugh Maps

  • When an incompletely specified function is given, for which there exist “don’t care conditions”, we indicate those terms by a hyphen (or other dc token).


Karnaugh maps74

Karnaugh Maps

  • When an incompletely specified function is given, for which there exist “don’t care conditions”, we indicate those terms by a hyphen (or other dc token).

yz00 01 11 10

00

01

wx

11

10

1 0 - 1

0 1 - 0

1 1 1 0

- 0 0 1


Karnaugh maps75

Karnaugh Maps

  • When an incompletely specified function is given, for which there exist “don’t care conditions”, we indicate those terms by a hyphen (or other dc token).

  • We may treat those termsas if they are 1’s OR 0’s,whichever is more usefulin leading to a minimalform of expression.

yz00 01 11 10

00

01

wx

11

10

1 0 - 1

?

0 1 - 0

?

1 1 1 0

- 0 0 1

?


Karnaugh maps76

Karnaugh Maps

  • When an incompletely specified function is given, for which there exist “don’t care conditions”, we indicate those terms by a hyphen (or other dc token).

  • We may treat those termsas if they are 1’s OR 0’s,whichever is more usefulin leading to a minimalform of expression.

yz00 01 11 10

00

01

wx

11

10

1 0 - 1

0 1 - 0

1

1 1 1 0

- 0 0 1

1


Karnaugh maps77

Karnaugh Maps

  • When an incompletely specified function is given, for which there exist “don’t care conditions”, we indicate those terms by a hyphen (or other dc token).

  • We may treat those termsas if they are 1’s OR 0’s,whichever is more usefulin leading to a minimalform of expression.

  • Ignore all unused dc conditions.

yz00 01 11 10

00

01

wx

11

10

1 0 - 1

0 1 - 0

1

1 1 1 0

- 0 0 1

1


Karnaugh maps78

Karnaugh Maps

  • When an incompletely specified function is given, for which there exist “don’t care conditions”, we indicate those terms by a hyphen (or other dc token).

  • We may treat those termsas if they are 1’s OR 0’s,whichever is more usefulin leading to a minimalform of expression.

PRIME IMPLICATES

yz00 01 11 10

00

01

wx

11

10

1 0 - 1

0

0 1 - 0

1 1 1 0

- 0 0 1


Karnaugh maps79

Karnaugh Maps

  • When an incompletely specified function is given, for which there exist “don’t care conditions”, we indicate those terms by a hyphen (or other dc token).

  • We may treat those termsas if they are 1’s OR 0’s,whichever is more usefulin leading to a minimalform of expression.

PRIME IMPLICATES

yz00 01 11 10

00

01

wx

11

10

1 0 - 1

0

0 1 - 0

1 1 1 0

- 0 0 1


Karnaugh maps80

Karnaugh Maps

  • When an incompletely specified function is given, for which there exist “don’t care conditions”, we indicate those terms by a hyphen (or other dc token).

  • We may treat those termsas if they are 1’s OR 0’s,whichever is more usefulin leading to a minimalform of expression.

  • Ignore all unused dc conditions.

PRIME IMPLICATES

yz00 01 11 10

00

01

wx

11

10

1 0 - 1

0

0 1 - 0

1 1 1 0

- 0 0 1


Summary

Summary

  • We have studied and developed several techniques for simplifying Boolean expressions.

  • These are based on the axioms, definitions and theorems of the Boolean Algebra, applied through the Boolean Calculus.

  • Powerful tabular techniques have been developed for rapid reduction to some minimal cost forms using

    • Karnaugh maps

  • An even more powerful technique has been developed by Quine and McCluskey (and Petrick). Time prevents covering this topic but it is described in advanced books on computer engineering and logic design.


  • Login