0% found this document useful (0 votes)
2 views17 pages

04 K-Map

The document provides an overview of Karnaugh Maps (K-maps) as a technique for simplifying Boolean expressions, detailing structures for 2, 3, and 4 variable K-maps. It explains the relationship between truth tables and K-maps, the grouping techniques for simplification, and the rules governing K-map simplification. Additionally, it includes examples and homework exercises for practicing K-map simplification for both Sum of Products (SOP) and Product of Sums (POS) forms.

Uploaded by

danyarshahab
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views17 pages

04 K-Map

The document provides an overview of Karnaugh Maps (K-maps) as a technique for simplifying Boolean expressions, detailing structures for 2, 3, and 4 variable K-maps. It explains the relationship between truth tables and K-maps, the grouping techniques for simplification, and the rules governing K-map simplification. Additionally, it includes examples and homework exercises for practicing K-map simplification for both Sum of Products (SOP) and Product of Sums (POS) forms.

Uploaded by

danyarshahab
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

15/5/2025

University of Raparin
College of Engineering
Department: Software

Lecturer: Hersh Mustafa Hama

[email protected]

Spring Semester 2025

Karnaugh Map (K – map)


 In the algebraic method of simplification, we need to write lengthy equations, find
the common terms, manipulate the expressions etc., so it is time consuming work.
 Thus “K-map” is another simplification technique to reduce the Boolean equation.
 It overcomes all the disadvantages of algebraic simplification techniques.
 The information contained in a truth table or available in the SOP or POS form is
represented on K-map.
 K-map Structure - 2 Variable:
 A & B are variables or inputs
 0 & 1 are values of A & B
 2 variable k-map consists of 4 boxes. (i.e. 22 = 4) 2

1
15/5/2025

Two – Variable K-map


 Inside 4 boxes we have enter values of F (i.e. output)

Relationship between Truth Table & K-map


𝐴ҧ 𝐴
𝐴 0 1
A B F 𝐵
𝐵ത 0 0 0
0 0 0
𝐵 1 1 1
0 1 1
𝐵ത 𝐵
1 0 0 𝐵 0 1
𝐴
1 1 1 𝐴ҧ 0 0 1

𝐴 1 0 1
4

2
15/5/2025

Three – Variable K-map


 K-map Structure - 3 Variable
 A, B & C are variables or inputs
 3 variable k-map consists of 8 boxes (i.e. 23 = 8)

Three – Variable K-map


 Three Variable K-map and its associated product terms

3
15/5/2025

Three – Variable K-map


 Three Variable K-map and its associated product terms

Four – Variable K-map


 K-map Structure - 4 Variable
 A, B, C & D are variables or inputs
 Four variable k-map consists of 16 boxes (i.e. 24 = 16)

4
15/5/2025

Four – Variable K-map


 Four Variable K-map and its associated product terms

𝐴ҧ𝐵ത 𝐶ҧ 𝐷 ҧ 𝐶ҧ 𝐷
ഥ 𝐴𝐵 ഥ 𝐴𝐵 𝐶ҧ 𝐷
ഥ 𝐴𝐵ത 𝐶ҧ 𝐷
ഥ 𝐴ҧ𝐵ത 𝐶ҧ 𝐷
ഥ 𝐴ҧ𝐵ത 𝐶𝐷
ҧ 𝐴ҧ𝐵𝐶𝐷
ത 𝐴ҧ𝐵𝐶
ത 𝐷ഥ

𝐴ҧ𝐵ത 𝐶𝐷
ҧ 𝐴𝐵
ҧ 𝐶𝐷
ҧ 𝐴𝐵 𝐶𝐷
ҧ 𝐴𝐵ത 𝐶𝐷
ҧ ҧ 𝐶ҧ 𝐷
𝐴𝐵 ҧ 𝐶𝐷
ഥ 𝐴𝐵 ҧ 𝐴𝐵𝐶𝐷
ҧ ҧ 𝐷
𝐴𝐵𝐶 ഥ

𝐴ҧ𝐵𝐶𝐷
ത ҧ
𝐴𝐵𝐶𝐷 ത
𝐴𝐵𝐶𝐷 𝐴𝐵𝐶𝐷 𝐴𝐵 𝐶ҧ 𝐷 ҧ 𝐴𝐵𝐶𝐷 𝐴𝐵𝐶 𝐷
ഥ 𝐴𝐵𝐶𝐷 ഥ

𝐴ҧ𝐵𝐶
ത 𝐷 ҧ 𝐷
ഥ 𝐴𝐵𝐶 ഥ 𝐴𝐵𝐶 𝐷
ഥ 𝐴𝐵𝐶
ത 𝐷ഥ 𝐴𝐵ത 𝐶ҧ 𝐷 ҧ 𝐴𝐵𝐶𝐷
ഥ 𝐴𝐵ത 𝐶𝐷 ത ത 𝐷
𝐴𝐵𝐶 ഥ
9

Four – Variable K-map


 Four Variable K-map and its associated minterms

𝑚0 𝑚4 𝑚12 𝑚8 𝑚0 𝑚1 𝑚3 𝑚2

𝑚1 𝑚5 𝑚13 𝑚9 𝑚4 𝑚5 𝑚7 𝑚6

𝑚3 𝑚7 𝑚15 𝑚11 𝑚12 𝑚13 𝑚15 𝑚14

𝑚2 𝑚6 𝑚14 𝑚10 𝑚8 𝑚9 𝑚11 𝑚10


10

5
15/5/2025

Representation of Standard SOP form expression on K-map


 For example, SOP equation is given as:

𝐹 = 𝐴ҧ𝐵ത 𝐶ҧ + 𝐴ҧ𝐵𝐶
ത + 𝐴𝐵ത 𝐶ҧ + 𝐴𝐵𝐶ҧ + 𝐴𝐵𝐶
 The given expression is in the standard SOP form.
 Each term represents a minterm.
 We have to enter ‘1’ in the boxes corresponding to each minterm as below:
𝐵ത 𝐶ҧ ത
𝐵𝐶 𝐵𝐶 𝐵 𝐶ҧ
𝐴ҧ𝐵ത 𝐶ҧ 𝐴ҧ 𝐵𝐶

𝐴𝐵ത 𝐶ҧ 𝐴ҧ 1 1 0 0 𝐴𝐵𝐶

𝐴 1 0 1 1 𝐴𝐵 𝐶ҧ
11

Simplification of K-map
 Once we plot the logic function or truth table on K-map, we have to use the
grouping technique for simplifying the logic function.
 Grouping means the combining the terms in adjacent cells.
 The grouping of either 1’s or 0’s results in the simplification of Boolean expression.
 If we group the adjacent 1’s then the result of simplification is SOP form.
 If we group the adjacent 0’s then the result of simplification is POS form.
 Grouping: While grouping, we should group most number of 1’s.
 The grouping follows the binary rule i.e. we can group 1, 2, 4, 8, 16, 32, …
number of 1’s.
 We cannot group 3,5,7,………number of 1’s 12

6
15/5/2025

Grouping
 Pair: A group of two adjacent 1’s is called as Pair.
 Quad: A group of four adjacent 1’s is called as Quad.
 Octet: A group of eight adjacent 1’s is called as Octet.

 A pair eliminates one variable


𝐵ത 𝐶ҧ ത
𝐵𝐶 𝐵𝐶 𝐵 𝐶ҧ
ҧ
𝐹 = 𝐴𝐵𝐶 ҧ 𝐶ҧ
+ 𝐴𝐵
ҧ 𝐶 + 𝐶ҧ
𝐹 = 𝐴𝐵 (∵ 𝐶 + 𝐶ҧ = 1)
𝐴ҧ 0 0 1 1
ҧ
𝐹 = 𝐴𝐵
𝐴 0 0 0 0
13

Grouping of Two Adjacent 1’s : Pair


 A pair eliminates one variable

14

7
15/5/2025

Grouping of Four Adjacent 1’s : Quad

A Quad eliminates
two variable.

15

Grouping of Four Adjacent 1’s : Quad

A Quad eliminates
two variable.

16

8
15/5/2025

Grouping of Eight Adjacent 1’s : Octet

A Octet eliminates
three variable.

17

Rules for K-map Simplification


 Groups may not include any cell containing a zero.

Not Accepted

 Groups may not be diagonal.

Not Accepted

18

9
15/5/2025

Rules for K-map Simplification

 Groups must contain 1,2,4,8 or in general 2n cells.

Not Accepted

 Each group should be as large as possible

19

Rules for K-map Simplification (Cont.)


 Each cell containing a one must be in at least one group.

 Groups may be overlap

20

10
15/5/2025

Rules for K-map Simplification (Cont.)


 Groups may wrap around the table. The leftmost cell in a row may be grouped with
rightmost cell and the top cell in a column may be grouped with bottom cell.

21

Rules for K-map Simplification (Cont.)


 There should be as few groups as possible, as long as this does not contradict any of
the previous rules.

Not Accepted Accepted


 A pair eliminates ONE variable.
 A Quad eliminates TWO variables.
 A octet eliminates THREE variables.
22

11
15/5/2025

K-map Simplification: Example #1


 For the given K-map write simplified Boolean expression:

𝐵 𝐶ҧ

 Simplified Boolean expression: 𝐹 = 𝐵𝐶ҧ + 𝐴𝐵 + 𝐴𝐶ҧ

23

K-map Simplification: Example #2


 For the given K-map write simplified Boolean expression:

 Simplified Boolean expression: 𝐹 = 𝐵ത + 𝐴ҧ 𝐶ҧ

24

12
15/5/2025

K-map Simplification: Example #3


 A logical expression in the standard SOP form is as follows:
𝐹 = 𝐴ҧ𝐵ത 𝐶ҧ + 𝐴𝐵
ҧ 𝐶ҧ + 𝐴𝐵𝐶
ҧ ത
+ 𝐴𝐵𝐶
 Minimize it with using the K-map technique

 Simplified Boolean expression: 𝐹 = 𝐴ҧ𝐶ҧ + 𝐴𝐵


ҧ + 𝐴𝐵𝐶

25

K-map Simplification: Example #4


 A logical expression representing a logic circuit is

𝐹 = ෍ 𝑚(0,1,2,5,13,15)

 Draw the K-map and find the minimized logical expression

 Simplified Boolean expression:

𝐹 = 𝐴ҧ𝐵ത 𝐷
ഥ + 𝐴ҧ𝐶𝐷
ҧ + 𝐴𝐵𝐷

26

13
15/5/2025

K-map Simplification: Example #5


 Minimize the following Boolean expression using K-map:

𝐹 𝐴, 𝐵, 𝐶, 𝐷 = ෍ 𝑚 (1, 3, 5, 9, 11, 13)

 Simplified Boolean expression:


ҧ
ത + 𝐶𝐷
𝐹 = 𝐵𝐷
𝐹 = 𝐷(𝐵ത + 𝐶)ҧ

27

K-map Simplification: Example #6


 Solve the following expression with K-maps:

𝐹(𝐴, 𝐵, 𝐶) = ෍ 𝑚(0,1,3,4,5)

 Simplified Boolean expression:


ҧ + 𝐵ത
𝐹 = 𝐴𝐶
28

14
15/5/2025

K-map Simplification: Example #7


 Solve the following expression with K-maps:

𝐹(𝐴, 𝐵, 𝐶, 𝐷) = σ 𝑚(0,1,3,4,5,7)

 Simplified Boolean expression:

𝐹 = 𝐴ҧ𝐶ҧ + 𝐴𝐷
ҧ

29

K-map Simplification: Home Work

 Simplify:

𝐹(𝐴, 𝐵, 𝐶) = ෍ 𝑚(1,2,4,6,7)

 Simplify:

𝐹(𝐴, 𝐵, 𝐶, 𝐷) = ෍ 𝑚(2,4,8,9,10,12, 14)

 Simplify:

𝐹(𝐴, 𝐵, 𝐶, 𝐷) = ෍ 𝑚(0,1,4,5,7,8,9,12, 13,15)

30

15
15/5/2025

K-map for Product of Sum Form (POS Expressions)

 Karnaugh map can also be used for Boolean expression in the Product of
sum form (POS).
 The procedure for simplification of expression by grouping of cells is also
similar.
 Complemented letters (e.g., 𝐴)ҧ represent 1 in binary, while uncomplemented
letters (e.g., 𝐴) represent 0.
 A zero is put in the cell for which there is a term in the Boolean expression.
 Grouping is done for adjacent cells containing zeros.
31

Example #1
 Simplify:
𝐹(𝐴, 𝐵, 𝐶, 𝐷) = ς 𝑀 (0,1,3,5,6,7,10,14,15)

 Simplified Boolean expression:


𝐹 = (𝐴ҧ + 𝐷 ҧ 𝐴ҧ + 𝐶ҧ + 𝐷)
ഥ )(𝐵ത + 𝐶)(
(𝐴 + 𝐵 + 𝐶)

32

16
15/5/2025

Example #2
 Simplify:
𝐹(𝐴, 𝐵, 𝐶, 𝐷) = ς 𝑀 (4,6, 10,12, 13,15)

 Simplified Boolean expression:


𝐹 = (𝐴ҧ + 𝐵 + 𝐶ҧ + 𝐷)(𝐴 + 𝐵ത + 𝐷)
(𝐴ҧ + 𝐵ത + 𝐷
ഥ )(𝐴ҧ + 𝐵ത + 𝐶)

33

17

You might also like