SYEN 3330 Digital Systems Jung H. Kim Chapter 2-6 1 SYEN 3330 Digital Systems Chapter 2 – Part 6.

Post on 21-Dec-2015

222 views 1 download

Tags:

Transcript of SYEN 3330 Digital Systems Jung H. Kim Chapter 2-6 1 SYEN 3330 Digital Systems Chapter 2 – Part 6.

SYEN 3330 Digital Systems Jung H. Kim Chapter 2-6 1

SYEN 3330 Digital Systems

Chapter 2 – Part 6

SYEN 3330 Digital Systems Chapter 2-6 2

Table Methods for PI Generation

This method of simplifying a Boolean equation was improved by Quine and McCluskey and is sometimes known as the Q-M Method.

The Tabular Method: 1. Starts with a table of minterms. 2. Compares each minterm with every other minterm in the list to find minterms which differ in exactly one variable. 3. Constructs a new list with terms of one fewer variables, keeping track of which minterms were covered. 4. Compares every element in the new list with each other to find terms that differ in one more variable. 5. Repeats Steps 3 and 4 until done.

SYEN 3330 Digital Systems Chapter 2-6 3

An Example: F(x,y,z)= m(2,3,6,7)

Initial work: Step 1 creates a table of minterms. Column (a) xyz

Column (b) xyz

Column(c) xyz

010 m2

011 m3

110 m6

111 m7 Step 2: Compare each minterm with all others.

010: (011 01-), (110 -10), (111 Ø)

011: (110 Ø), (111 -11)

110: (111 11-)

SYEN 3330 Digital Systems Chapter 2-6 4

Results - Step 2

Column (a) xyz

Column (b) xyz

Column(c) xyz 010 m2 (01-) m2,m3

011 m3 (-10) m2,m6 110 m6 (-11) m3,m7 111 m7 (11-) m6,m7

Note that there can be terms which are duplicated -- that is, they appear more than once. The terms are duplicates if they have the same pattern of bits (including the -) and they came from the same minterms. Only one of each duplicate term should remain.

SYEN 3330 Digital Systems Chapter 2-6 5

Step 3

Step 3: Make a new list by comparing items in Column (b). 01-: (-10 Ø), (-11 Ø ), (11- -1-)

-10: (01- Ø), (-11 -1-), (11- Ø )

-11: (01- -1-), (-10 -1-), (11- Ø )

11-: (01- -1-), (-10 Ø ), (-11 Ø )

Column (a) xyz

Column (b) xyz

Column(c) xyz 010 m2 (01-) m2,m3

011 m3 (-10) m2,m6 110 m6 (-11) m3,m7 111 m7 (11-) m6,m7

SYEN 3330 Digital Systems Chapter 2-6 6

The Results of Step 3 Column (a)

xyz Column (b) xyz

Column(c) xyz

010 m2 (01-) m2,m3 (-1-) m2,m3,m6,m7 011 m3 (-10) m2,m6 (-1-) m2,m6,m3,m7 110 m6 (-11) m3,m7 (-1-) m3,m7,m6,m7 111 m7 (11-) m6,m7 (-1-) m6,m7,m2,m3

Obviously, the Column (c) can be simplified by eliminating duplicates -- this leads to only one entry:

(-1-) from m2,m3,m6,m7 This corresponds to the Prime Implicant "y". The algorithm terminates at this point. Since this is the only PI and it covers all minterms, the result is: F(x,y,z) = y

SYEN 3330 Digital Systems Chapter 2-6 7

Computational Complexity Issues

The table method generates a lot of work. For "n" minterms, there are on the order of n2 comparisons required.

The Q-M Method simplifies the work by sorting the minterms into terms that can compare favorably. Terms that have no chance of combining are not even tried. It also adds some bookkeeping to simplify PI identification.

Grouping: Use the number of "1"s in the minterm to group the minterms. Preserve groups derived from this grouping in adjacent columns.

Bookkeeping: Use a "check mark" () next to terms that have been combined. Carry along lists of minterms used.

SYEN 3330 Digital Systems Chapter 2-6 8

Q-M on F(x,y,z)= m(2,3,6,7)Initial Group

Column (a) xyz

Column (b) xyz

Column(c) xyz One 1 010 m2

---------------- Two 1's 011 m3 110 m6 ---------------- Three 1's 111 m7 Step 2: Compare terms from adjacent groups.

Group 1 => Group 2 010: (011 01-), (110 -10)

Group 2 => Group 3 011: (111 -11) 110: (111 11-) NOTICE: Fewer steps!

SYEN 3330 Digital Systems Chapter 2-6 9

The Result of Step 3 Initial

Group Column (a) xyz

Column (b) xyz

Column(c) xyz One 1 010 m2 (01-) m2,m3

---------------- (-10) m2,m6 Two 1's 011 m3 ------------------ 110 m6 (-11) m3,m7 ---------------- (11-) m6,m7 Three 1's 111 m7

Step 4: Repeat on Column (b)

Group (1-2) => Group (2-3)

(01-): (-11 Ø), (11- -1-)

(-10): (-11 -1-), (11- Ø)

SYEN 3330 Digital Systems Chapter 2-6 10

Result of Step 4Initial Group

Column (a) xyz

Column (b) xyz

Column(c) xyz One 1 010 m2 (01-) m2,m3 (-1-)m2,m3,m6,m7 m6,m7 ---------------- (-10) m2,m6 (-1-)m2,m3,m6,m7 m3,m7 Two 1's 011 m3 -----------------

-

110 m6 (-11) m3,m7 ---------------- (11-) m6,m7 Three 1's

111 m7

Note that the resulting terms are duplicates and are unchecked at termination.

Final Result: F(x,y,z) = y

In general, when no new terms can be generated, the set of all unchecked terms give the result.

SYEN 3330 Digital Systems Chapter 2-6 11

Review of Boolean Logic

Given a Boolean Function F, We have learned to express F as: 1. Canonical Sum-of-Minterms

2. Canonical Product-of-Maxterms

3. Standard Sum-of-Products (SOP) Form

4. Standard Product-of-Sums (POS) Form

We have also learned how to minimize the number of literals in F by using:

1. Algebraic Simplification.

2. Selection of Prime Implicants (Karnaugh Map and Quine-McCloskey Method)

3. Systematic K-Map to minimum literal SOP.

SYEN 3330 Digital Systems Chapter 2-6 12

Canonical Forms

15,13,11,10,8,5,4,2,0),,,( zyxwF

14,12,9,7,6,3,1)z,y,x,w(F

NOTE: there is one and only one way to write the equations in Canonical Sum-of-minterm and Canonical Product-of-Maxterm form.

SYEN 3330 Digital Systems Chapter 2-6 13

Minimum Literal SOP FormExample: Find a minimum literal Standard SOP form for F(w,x,y,z)

F(w,x,y,z) = x'z' + w'xy' + wxz + wx'y

F(w,x,y,z) = x'z' + w'y'z' + xy'z + wyz

NOTE: Both are minimum literal SOP!

SYEN 3330 Digital Systems Chapter 2-6 14

Tabular Method to Find a Cover

1). Construct a table with:

a). Columns for each minterm and

b). Rows for each Prime Implicant

2). Select Essential Prime Implicants and check off each covered minterm.

3). Delete Less Than Prime Implicants

4). Select Secondary Essential Prime Implicants and check off each covered minterm.

5). Repeat 3 and 4 until a cover is generated.

If cycles exist, pick a PI and generate a cover and then delete that same PI and generate an alternate cover. Select the minimum literal cover.

SYEN 3330 Digital Systems Chapter 2-6 15

Table Method Example

Function g(w,x,y,z)

Step 1, Enter table:

PI 0 1 2 3 5 8 10 13 14 15 Type

x' z' x x x x

w' x' x x x x

w' y' z x x

x y' z x x

w x z x x

w x y x x

w y z' x x

SYEN 3330 Digital Systems Chapter 2-6 16

Select Essential Prime ImplicantsStep 2: Select Essential Prime Implicants and check them off along with minterms covered.

PI 0 1 2 3 5 8 10 13 14 15 Type x'z' x x x x Essential w'x' x x x x Essential w'y'z x x xy'z x x wxz x x wxy x x wyz' x x

Note: w'y'z is less than xy'z since xy'z covers two as yet uncovered minterms (m5 and m13) while w'y'z covers one (m5) uncovered minterm.

Similarly wyz' is less than wxy. Why?

SYEN 3330 Digital Systems Chapter 2-6 17

Less Than Prime Implicants

Step 3: Delete Less Than Prime Implicants

PI 0 1 2 3 5 8 10 13 14 15 Type x'z' x x x x Essential w'x' x x x x Essential w'y'z x x Less Than xy'z x x wxz x x wxy x x wyz' x x Less Than

Note that after deleting the Less Than PIs, the following occurs: Minterm 5 is only covered by xy'z and Minterm 14 by wxy. Thus wxy and xy'z are Secondary Essential PIs.

SYEN 3330 Digital Systems Chapter 2-6 18

Secondary Essential PIs PI 0 1 2 3 5 8 10 13 14 15 Type x'z' x x x x Essential w'x' x x x x Essential

w'y'z x x Less Than xy'z x x Secondary

Essential wxz x x (Redundant) wxy x x Secondary

Essential wyz' x x Less Than

Note that at this point, minterms 13 and 15 are already covered, so the PI wxz is redundant. The algorithm terminates at this point with the minimum literal, Standard Sum-of-Products form:

F(w,x,y,z) = x'z' + w'x' + xy'z + wxy

SYEN 3330 Digital Systems Chapter 2-6 19

Cyclic Structures

Let F(x,y,z) = m(0,1,2,5,6,7)

PI 0 1 2 5 6 7 Type x' y' x x y' z x x x z x x x y x x y z' x x x' z' x x

We build the following PI Table:

SYEN 3330 Digital Systems Chapter 2-6 20

Cyclic Structure: Pick OneNOTE: All minterms are covered twice. No PIs are essential. A cyclic structure exists.

Step 1: Pick a PI and mark off the covered minterms.

PI 0 1 2 5 6 7 Type x' y' x x (Picked) y' z x x x z x x x y x x

y z' x x

x' z' x x

SYEN 3330 Digital Systems Chapter 2-6 21

Less Thans

Step 2: Eliminate Less Thans.

PI 0 1 2 5 6 7 Type x' y' x x (Picked) y' z x x Less Than x z x x x y x x y z' x x x' z' x x Less Than

Once the less thans are deleted, there are two secondary essential PIs.

SYEN 3330 Digital Systems Chapter 2-6 22

Secondary Essential PIsStep 3: Pick Secondary Essential PIs.

PI 0 1 2 5 6 7 Type x' y' x x (Picked) y' z x x Less Than x z x x Secondary

EPI x y x x (Redundant) y z' x x Secondary

EPI x' z' x x Less Than

Picking the two secondary essential PIs generates a complete cover and we can state that the Standard Sum of Products form for F(x,y,z) is:

F(x,y,z) = x'y' + xz + yz'

SYEN 3330 Digital Systems Chapter 2-6 23

Now Go Back and Try AgainStep 1': GO BACK and eliminate the PI you picked and generate a new cover.

PI 0 1 2 5 6 7 Type x' y' x x (Eliminated) y' z x x Essential x z x x x y x x y z' x x x' z' x x Essential

Note that y'z and x'z' become essential PIs.

Select y'z and x'z' and then notice that xz and yz' become less thans.

SYEN 3330 Digital Systems Chapter 2-6 24

Finish UpStep 2': Eliminate the less thans.

Step 3': Select Secondary Essential PIs.

PI 0 1 2 5 6 7 Typex' y' x x (Eliminated)

y' z x x Essential PIx z x x Less Than

x y x x Secondary EPIy z' x x Less Than

x' z' x x Essential PI

Notice that after Step 2', xy is a secondary essential PI and that picking it completes the cover. Thus the Standard Product of Sums form for this selection is: F(x,y,z) = y'z + xy + x'z'

Both Implementations are Minimum Literal.

SYEN 3330 Digital Systems Chapter 2-6 25

Minimum SOP to Minimum POS

We can use the minimization techniques learned so far to implement a minimum literal, Standard POS form.

We take the following steps:

1. Implement the COMPLEMENT of a function in Standard Sum of Product form.

2. Use DeMorgan's Law to complement the function and convert it to Standard Product of Sum form.

NOTE: Implementing the complement of a function means using the ZEROS on the K-Map.

SYEN 3330 Digital Systems Chapter 2-6 26

Minimum POS Example

Given g(w,x,y,z): Form the Complement (Circle Zeros):

Next we minimize the function using a table method (or from the K-Map).

SYEN 3330 Digital Systems Chapter 2-6 27

Table Method Minimum SOP

PI 4 6 7 9 11 12 Type wx'z x x Essential PI xy'z' x x Essential PI w'xy x x Essential PI

w'xz' x x Redundant

Thus: g'(w,x,y,z) = wx'z + xy'z' + w'xy

This implements a Standard Sum of Products form for the complement of the desired function.

Applying DeMorgan's Law we get: g = (w'+x+z')(x'+y+z)(w+x'+y')

A minimum literal Standard POS form.