Lecture 5 Karnaugh-Map - Dongguksoc.dgu.edu/class/digital5.pdf · Lecture 5 - 2 Youpyo Hong,...

26
Lecture 5 - 1 Youpyo Hong, Dongguk University Lecture 5 Karnaugh-Map

Transcript of Lecture 5 Karnaugh-Map - Dongguksoc.dgu.edu/class/digital5.pdf · Lecture 5 - 2 Youpyo Hong,...

Lecture 5 - 1

pyo Hong, Dongguk University

You

Lecture 5

Karnaugh-Map

Lecture 5 - 2

pyo Hong, Dongguk University

ic

p

A

You

Karnaugh-Map

Set Log

Venn Diagram K-ma

A

A

A

Lecture 5 - 3

pyo Hong, Dongguk University

A

You

K-Map for 2 Variables

A

AB AB AB

A B

B

B

Lecture 5 - 4

pyo Hong, Dongguk University

AB B

You

K-Map for 3 Variables

ABC

B BA

C

C

Lecture 5 - 5

pyo Hong, Dongguk University

, and Logic

A

1

0

F

Map

Diagramuit Represenation)

You

Logic Expression, Truth Table, K-MapDiagram

A

B

B

F = A B + AB 1

0

A

B

AB

Logic Expression

K-

Logic

A B F

0 0

00

1

1

01

11

10

Truth Table(= Digital Circ

Lecture 5 - 6

pyo Hong, Dongguk University

Function

A

1

1

F

⋅B = AB + A⋅B + A⋅B

You

Non-Unique Circuits for the Same

A

B

B

F = A + A⋅B

1

0

A

B

AB

Because F = A+A⋅B = A⋅(B + B)+A

AB

F AB

A

Lecture 5 - 7

pyo Hong, Dongguk University

. ex) X, Y, X

t of two or more lit-e represented by a

x) W+Y, XY+Z+A

ar. appears more

literals. ex) WXY,

You

Key Terms

• Literal - a variable or the complement of a variable

• Product Term (=Cube) : a single literal or a producerals. ex) Z, XY, WYZ, W⋅Y⋅Z. A product term can brectangle in a K-map and we will see why later.

• Sum-of-product (=SOP) : a sum of product terms. e

• Sum Term.

• Product-of-Sums (POS).

• Normal Term - a product or sum term in which no v

than once. ex) XYZ, Y+W

• n-variable minterm - a normal product term with n WXY (3-variable minterm)

Lecture 5 - 8

pyo Hong, Dongguk University

le.

naturally.

m naturally.s we will see.

You

True Table Again

• Let’s derive the logical expression from a truth tab

• A truth table provides a Sum-of-Product (SOP) form : each product is a minterm in this case.

• A K-map also provides a Sum-of-Product (SOP) for : each product does not have to be a minterm a

X Y Z F

00001010

00001111

00110011

01010101

F = X⋅Y⋅Z + X⋅Y⋅Z

(= XZ)

Lecture 5 - 9

pyo Hong, Dongguk University

Our Choice

You

K-Map Indexing Methods

Y

Z

XYZ 00 01 11 10

0

1

X

Lecture 5 - 10

pyo Hong, Dongguk University

uits “easily” from

ble in positive and

X⋅Y⋅Z

X⋅Y⋅Z

You

Property of K-Map

• One cell in K-map represents a minterm.

• We can get an AND-OR (Sum-of-Product) style circK-map.

• Two adjecent cells in K-map contain the same varianegative forms.

XYZ 00 01 11 10

0

1

1 10 0

0 0 0 0

Lecture 5 - 11

pyo Hong, Dongguk University

are a line..

11 10

1 1

0 0

0 0

1 1

You

Adjacency in K-Map (1)

A cell is adjacent to the cells if they sh

WXYZ

00 01

1 0

0 0

XYZ

00 01 11 10

0

1

0 11 0

0 0 0 00 0

0 0

000111

10

Lecture 5 - 12

pyo Hong, Dongguk University

to the cell on the !)

11 10

1 1

0 0

0 0

1 1

You

Adjacency in K-Map (2)

Note that the cell on the boundary are adjacentother side. (You need some imagination power!

WXYZ

00 01

1 0

0 0

XYZ

00 01 11 10

0

1

0 11 0

0 0 0 00 0

0 0

000111

10

Lecture 5 - 13

pyo Hong, Dongguk University

tion

he cells with 1

be combined into

ssion from K-map?

X⋅Y⋅Z

X⋅Y⋅Z

You

Motivation of K-Map Simplifica

• If we express K-map using logic expression, only tshow up in Sum-of-Product form.

• Two product terms that differ only in a variable canone.

Ex) X⋅Y⋅Z + X⋅Y⋅Z = XZ(Y+Y) = XZ

• We like simpler form. How can we get simler expre

XYZ 00 01 11 10

0

1

1 1

F = X⋅Y⋅Z + X⋅Y⋅Z

0 0 0 0

0 0

Lecture 5 - 14

pyo Hong, Dongguk University

ation

in that ractangle

r negative) is con-

X⋅Z

You

Introduction to K-Map Simplific

• We use a ractangle to specify that the product termcan be combined to one product.

• How to read the expression for a ractangle?

- Find out the variable whose polarity (positive osistent in the ractangle.

XYZ 00 01 11 10

0

1

1 1

0 0 0 0

0 0

Lecture 5 - 15

pyo Hong, Dongguk University

ding

You

Excercise on a Ractangle Rea

XYZ 00 01 11 10

0

1

1 1

0 0 1 0

0 0

WXYZ

00 01 11 10

1 11 0

0 1 1 0

0 1 1 0

0 0 1 1

000111

10

Lecture 5 - 16

pyo Hong, Dongguk University

d K-Map

6 4

7 5

, 7)

11 10

You

Minterm Numbers in Truth Table an

X Y Z minterm no.

01234567

00001111

00110011

01010101

0 2

1 3

F =X⋅Y⋅Z + X⋅Y⋅Z can be described by F = (0

XYZ 00 010

1

Lecture 5 - 17

pyo Hong, Dongguk University

les

0 0

0 0

+ ABC = A C + AC

0 0

0 0

11 10

11 10

You

K-Map Simplification Examp

A B C F

11110000

00001111

00110011

01010101

F = (0,1,2,3)1 1

1 1

F = A B C + A BC + ABC

1 1

1 1

F = A C + AC = A

ABC 00 01

ABC 00 01

0

1

0

1

Lecture 5 - 18

pyo Hong, Dongguk University

You

1 1

0 0

1 1

0 0

1 0

1 0

0 1

0 1

XYZ 00 01 11 10

XYZ 00 01 11 10

0

1

0

1

Lecture 5 - 19

pyo Hong, Dongguk University

ible.

+ Y⋅Z (Better)

+ X⋅Y⋅Z

You

• Lesson

- Combine cells using as large ractangle as poss

1 1

0 0

1 0

0 0

F = X⋅Z

1 1

0 0

1 0

0 0

F = X⋅Z

XYZ 00 01 11 10

XYZ 00 01 11 10

0

1

0

1

Lecture 5 - 20

pyo Hong, Dongguk University

ant cover

ible cover

lls in a rectangle circled. Why?)

You

• Lesson

- Use as few ractangless possible.

1 1

1

1 1

1 1Redund

XYZ 00 01 11 10

XYZ 00 01 11 10

0

1

0

1

Imposs

(Only cecan be

Lecture 5 - 21

pyo Hong, Dongguk University

into one cover.

bles

You

Adjacent Covers

ABCD

00 01 11 10

1 11 0

0 1 1 1

0 1 1 1

0 0 1 1

000111

10

A ⋅ D

A ⋅ D

Then the two covers can be combined

if the two covers are adjecent.

The two covers differ in only one varia

Lecture 5 - 22

pyo Hong, Dongguk University

s

ned.

d.

e variables.

You

Partially Overlapped Cover

ABCD

00 01 11 10

0 00 0

1 1 1 0

1 1 1 0

0 0 0 0

000111

10

A ⋅ D

B ⋅ D

Then the two covers cannot be combi

The two covers are partially overlappe

The two covers differ in more than on

Lecture 5 - 23

pyo Hong, Dongguk University

Sizes

ned.

e variables.

You

Adjacent Covers with Different

ABCD

00 01 11 10

0 00 0

1 1 1 0

1 1 1 0

0 0 0 0

000111

10

A ⋅ D

A ⋅ B ⋅D

Then the two covers cannot be combi

The two covers have different size.

The two covers differ in more than on

Lecture 5 - 24

pyo Hong, Dongguk University

a segment along

11 10

1 1

0 0

0 0

1 1

You

Adjacency in K-Map (3)

A cube is adjacent to another cube if they shareone side and their sizes are the same.

WXYZ

00 01

1 0

0 0

XYZ

00 01 11 10

0

1

0 11 0

0 0 0 00 0

0 0

000111

10

Lecture 5 - 25

pyo Hong, Dongguk University

ined

...

You

The Covers That Can Be Comb

• They must be adjecent.

• Correct covers can have 2n cells in it.

2 + 2 = 4, 4 + 4 = 8, 8 + 8 = 16, so on..

Lecture 5 - 26

pyo Hong, Dongguk University

01 11 101 1

0 1 1

0

01 11 10

1 01

1 1 0

0 0 0

0 0 0

You

Practice

ABCD

00 01 11 10

1 00 1

1 1 1 0

1 1 0 0

0 0 0 0

000111

10

XYZ 00 01 11 10

0

1

1 1

1 1 1 1

1 1

XYZ 00

0

1 0

1

ABCD

00

1

1

0

0

000111

10