Chapter 4 Karnaugh Map

Page 1

Chapter 4 Karnaugh Map


Introduction • Another method to simplify the Boolean expression is by using Karnaugh map (K-map). • K-map is a graphical representation of the output for a given Boolean expression. • It contains the same information as the truth table. • It also contains a cell for each input combination. • A Boolean expression or a truth table with n input variables has 2n cells on the K-Map.

10/9/2012

2


2-variables K-Map • The 2- variables K-Map has 22 = 4 cells. • It has 4 combinations of input. Truth table

A B

10/9/2012

0

0

0

1

0

1

2

1

0

3

1

1

K-Map

Y

A

A

B 0

2

1

3

B

3


3-variables K-Map • The 3- variables K-Map has 23 = 8 cells. • It has 8 combinations of input. Truth table

10/9/2012

K-Map

A

B

C

0

0

0

0

1

0

0

1

2

0

1

0

3

0

1

1

4

1

0

0

5

1

0

1

6

1

1

0

7

1

1

1

Y A B AB

AB

AB

C 0

2

6

4

1

3

7

5

C

4


4-variables K-Map A B C D Y Truth table

10/9/2012

0

0 0 0 0

1

0 0 0 1

2

0 0 1 0

3

0 0 1

4

0 1 0 0

5

0 1 0 1

6

0 1

1 0

7

0 1

1

8

1 0 0 0

9

1 0 0 1

10

1 0 1 0

1

1

11

1 0 1

12

1

1 0 0

13

1

1 0 1

14

1

1

1 0

15

1

1

1

1

1

• The 4-variables K-Map has 24 = 16 cells. • It has 16 combinations of input. K-Map

AB

AB

AB

AB

CD CD CD CD

0

4

12

8

1

5

13

9

3

7

15

11

2

6

14

10

5


Simplification of 2-variables K-Map 1

Steps:

Identify the SOP expression from the truth table.

Example:

0

3

2 A B

Y

0

0

0

1

0

1

1

2

1

0

1

3

1

1

1

Plot a 1 on the K-map for each output Y=1 A

A

B 0

B

A

1 1

2

1 1

3

B

Draw loops around adjacent cells. The largest loop is a group of 4 cells followed by 2 and 1 cell. The loops may overlap.

4

Repeat step 2 and 3 until each bit 1 has been looped. Each loop produces a simplified product.

5

Then, logically OR the simplified product term. Y= A + B

10/9/2012

6


Simplification of 3-variables K-Map Steps:

1

Example:

A

B

C

Y

0

0

0

0

0

1

0

0

1

1

2

0

1

0

1

3

0

1

1

1

4

1

0

0

0

5

1

0

1

1

6

1

1

0

1

7

1

1

1

1

10/9/2012

Identify the SOP expression from the truth table.

2

2

Plot a 1 on the K-map for each output Y=1

A B AB C

1 0

C

1

3

AB

A B AB

1

C 6

2

1 1

AB

1 3

0

4

1 7

1

C 5

1

AB B

1 6

2

1 1

AB

1 3

4

1 7

C

5

Draw loops around adjacent cells. The largest loop is a group of 8 cells, followed by 4, 2 and 1 cell. The loops may overlap.

4

Repeat step 2 and 3 until each bit 1 has been looped. Each loop produces a simplified product.

5

Then, logically OR the simplified product term.

Y= B + C

7


Simplification of 4-variables K-Map A B C D Y 0

0 0 0 0

1

1

0 0 0 1

1

2

0 0 1 0

1

3

0 0 1

1

4

0 1 0 0 0

5

0 1 0 1

6

0 1

1 0 0

CD

1

7

0 1

1

CD

1

8

1

1

Example:

2A B

CD

1 0 0 0

1

9

1 0 0 1

1

10

1 0 1 0

1

11

1 0 1

1

3

12

1

1 0 0 0

13

1

1 0 1

4

14

1

1

15

1

0

1 0 0

10/9/2012

1

1

1

1

0

CD

Identify the SOP expression from the truth table. Plot a 1 on the K-map for each output Y=1

AB

AB

AB

1

AB

1 0

1 1

1 2

Steps:

4

12

5

13

1 1

8

1

1

9

1

3

7

15

2

6

14

1

11

1 10

CD

AB

AB

1

1 0

CD

1

CD

1

CD

1

4

12

1 1

3

8

1 5

13

1

9

1 7

15

11

1 2

B

5

AB

6

14

10

AD

Draw loops around adjacent cells. The largest loop is a group of 16 cells, followed by 8,4, 2 and 1 cell. The loops may overlap. Repeat step 2 and 3 until each bit 1 has been looped. Each loop produces a simplified product. Then, logically OR the simplified product term.

RA/Sept2012-Jan2013

Y = B + AD 8


Designing Combinational Logic Circuits Example

• The diagram shown below is a water filtering system. A water quality sensing detector will generate a quality scale from 0 – 7. From this scale, selected filter will function as follows to produce clean water. Filter

Water flow

A B

Water quality sensing detector

C

Clean water

Water Condition The cleanest

Logic circuit

Scale 0 - 7

The dirtiest

10/9/2012

Scale 0 1 2 3 4 5 6 7

Filters needed No filters are activated A only A, B and C B only A only A and B only A and C only A, B and C

Design the logic circuit. Your solution should include: a) Truth table. b) Simplified expression using Karnaugh map. c) Based on the simplified expression in (b), draw the logic circuit. 9


Designing Combinational Logic Circuits Solution:

1

Derive the truth table

A B C

FA

FB

FC

0 0 0

0

0

0

0 0

1

1

0

0

0

0

1

1

1

1

0

1

1

0

1

0

1

0 0

1

0

0

1

0

1

1

1

0

1

1

0

1

0

1

1

1

1

1

1

1

2

A B AB

BC

C

1 0

C

AB

AB

1

1 6

2

1

1 1

BC

C

A 4

1 7

3

A B AB

AB

FA  A  BC  BC

5

AB

1 0

C

6

2

1 1

AB 10/9/2012

Simplify the Boolean expression using K-map

1 3

4

FB  AB  AC

1 7

5

AC 10


Designing Combinational Logic Circuits Solution:

1

10/9/2012

Derive the truth table

A B C

FA

FB

FC

0 0 0

0

0

0

0 0

1

1

0

0

0

1

0

1

1

1

0

1

1

0

1

0

1

0 0

1

0

0

1

0

1

1

1

0

1

1

0

1

0

1

1

1

1

1

1

1

2

Simplify the Boolean expression using K-map

A B AB

BC C

1 0

AB

AB

AB

1 2

C

6

4

7

5

FC  BC  AB

1 1

3

11


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.