Download as pdf or txt
Download as pdf or txt
You are on page 1of 43

K-MAP

Gate-Level Minimization

Karnaugh map(K- Map)

➢ Boolean expressions can be simplified by using basic Boolean postulates but as

the procedures are difficult to apply in a systematic way and it is difficult to tell

when you have arrived at a minimal solution.

➢ Boolean expressions can be graphically depicted and simplified with the use of

Karnaugh maps (K-Map).


➢ A K-map is a diagram made up of squares, with each square
representing one minterm of the function that is to be minimized.

➢ The simplified expression produced by the K-map is always in


one of the two standard forms: sum of products or product of
sums.

➢ It will be assumed that the simplest algebraic expression is an


algebraic expression with a minimum number of terms and
with smallest possible number of literals in each term.
Two-Variable K-Map
A B

0 0 0

1 0 1

2 1 0

3 1 1
Three-Variable K-Map
Four-Variable K-Map
Plot the following functions on the Karnaugh map
Z(A,B)= AB’ + A’B + A’B’

B 0 1
A

0 1 1

1
1
Z(A,B,C)= AB’ C’+ A’BC + AB’C + A’BC’
4 3 5 2

BC 00 01 11 10
A

0 1 1

1
1 1
0 2 3 5 9 11

CD 00 01 11 10
AB

00 1 1 1

01 1

11

10 1 1
Plot the four-variable Boolean function F (A, B, C,D) = Σm(0, 2, 5, 7, 8, 10, 13,15)
on the Karnaugh map.

CD 00 01 11 10
AB

00 1 0 0 1

01 0 1 1 0

11 0 1 1 0

10 1 0 0 1
A Typical K-Map
K-Map Simplification Technique
Form the Groups
➢K-map simplification can also be referred to as the "simplification by
grouping" technique as it solely relies on the formation of clusters.

➢That is, the main aim of the entire process is to gather together as
many ones (for SOP solution) or zeros (for POS solution) under one roof for
each of the output variables in the problem stated.

➢However, while doing so we have to strictly abide by certain rules and


regulations:
K-Map Simplification Technique ……

➢ The process has to be initiated by grouping the bits which lie in adjacent cells
such that the group formed contains the maximum number of selected bits.
➢ This means that for an n-variable K-map with 2n cells, try to group for 2n cells
first, then for 2n-1 cells, next for 2n-2 cells, and so on until the “group”
contains only 20 cells, i.e., isolated bits (if any).
➢ Note that the number of cells in the group must be equal to an
integer power to 2, i.e., 1, 2, 4, 8. . . .

➢ The procedure must be applied for all adjacent cells of the K-map, even when
they appear to be not adjacent—the top row is considered to be adjacent to
the bottom row and the rightmost column is considered to be adjacent to the
leftmost column, as if the K-map wraps around from top to bottom and right
to left.
K-Map Simplification Technique ……

➢ A bit appearing in one group can be repeated in another group provided


that this leads to the increase in the resulting group-size.
✓For example, cell 5 is repeated in both Group 3 as well as 4 in SOP
form as it results in the formation of a group with two cells instead of
a group with just one cell.
➢ Don’t Care conditions are to be considered for the grouping activity if
and only if they help in obtaining a larger group.
✓Otherwise, they are to be neglected. Here the Don't Care terms in
the cells 0 and 1 are considered to create Group 2 of SOP solution
form as it results in a group with four cells instead of just two.
•Consider the consecutive ‘ones’ in the K-map cells and group them (green boxes).

•Each group should contain the largest number of ‘ones’ and no blank cell.

•The number of ‘ones’ in a group must be a power of 2 i.e. a group can contain
•Grouping has to be carried-on in decreasing order meaning, one has to try to group
for 8 (octet) first, then for 4 (quad), followed by 2 and lastly for 1 (isolated ‘ones’).

•Grouping is to done either horizontally or vertically or interms of squares or


rectangles. Diagonal grouping of ‘ones’ is not permitted.
•The same element(s) may repeat in multiple groups only if this increases
the size of the group.

•The elements around the edges of the table are considered to be adjacent and
can be grouped together.

•Don’t care conditions are to be considered only if they aid in increasing


the group-size (else neglected).
SOP Form Solution

Number of groups
having 16 cells
0

Number of groups
having 8 cells
0

Number of groups Group 1 (Cells 0,2,8,10) B’D’


having 4 cells (Blue
Enclosures in
2
Figure 3) Group 2 (Cells 0,1,4,5) A’C’

Group 3 Group 4
Number of groups (Cells 5,7) (Cells 5,13)
having 2 cells A’BD BC’D
(Orange Enclosures
4
Group 5 Group 6
in Figure 3) (Cells 10,11) (Cells 10,14)
AB’C ACD’

Number of groups
having 1cell (Green
Enclosures in
0
Figure 3)
Thus, Y = B̅D̅ + A̅C̅ + A̅BD + BC̅D + AB̅C + ACD̅
System Design
Simplify the Boolean function: f (A,B) =Σm(0, 1, 2)

B 0 1
A

A’
0 1 1

1
1

f (A,B) = A’ + B’

B’
Simplify the Boolean function: f (A,B) = AB̅ + A̅B + AB

B 0 1
A

0 1 B

1
1 1

f (A,B) = A + B

A
Simplify the Boolean function: f (A,B,C) = Σm(2, 3, 4, 5)

BC 00 01 11 10
A

0 1 1 A’B

1
1 1

AB’
f (A,B,C) = AB’ + A’B
Simplify the Boolean function: f (A,B,C) =Σm(3, 4, 6, 7)

BC 00 01 11 10
A

0 1

1
1 1 1

f (A,B,C) = AC’ + BC
Simplify the Boolean function: f (A,B,C) =ΠM(3, 4, 6, 7)

BC 00 01 11 10
A

0 0

1
0 0 0

f (A,B,C) = (A’ + C) . (B’ + C’)


Simplify the following four-variable function:
f (A,B,C,D) =Σm(0, 1, 4, 5, 7, 8, 9, 12, 13, 15)

CD 00 01 11 10
AB

00 1 1
F = C’ + BD

01 1 1 1

11 1 1 1

10 1 1
Simplify the following four-variable function:
F (A, B, C,D) = Σm(0, 2, 5, 7, 8, 10, 13, 15)

CD 00 01 11 10
AB

00 1 1

01 1 1

11 1 1

10 1 1
Σm(0,2,3,5,9,11)
CD 00 01 11 10
AB

00 1 1 1

F = A’B’C + A’B’D’ +
01 1 AB’D + A’BC’D

11

10 1 1
Obtain the minimal POS expression for the given Boolean function using

K-Map F (A, B, C, D) = π (0, 1, 3, 5, 6, 7, 10, 14, 15)

CD 00 01 11 10
AB

00 0 0 0

A+B+C
01 0 0 0

11 0 0

10 0

A’ + C’ + D
Obtain the simplified POS expression for the given Boolean function using

K-Map F (A, B, C, D) = π (0, 1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 14)

CD 00 01 11 10
AB

00 0 0 0 0

0 0 0 F = B . D . (A + C’)
01

11 0 0

10 0 0 0 0
Obtain the minimal SOP expression for the given Boolean function using K-
Map F (A, B, C, D) = Σm (0, 1, 4, 6, 8, 9, 10, 12) + d (3, 7, 11, 13, 14, 15) and draw
the circuit using two input NAND gate.

CD 00 01 11 10
AB

00 1 1 X
F = A + B’C’ + BD’

01 1 X 1

11 1 X X X

10 1 1 X 1
Circuit diagram using two input NAND gate:
Obtain the minimal POS expression for the given Boolean function using
K-Map F (A, B, C, D) = π (0, 1, 4, 6, 8, 9, 10, 12) + d (3, 7, 11, 13, 14, 15)

CD 00 01 11 10
AB

00 0 0 X

F = A’ . (B’ + D) . (B + C)
01 0 X 0

11 0 X X X

10
0 0 X 0
Simplify the following Boolean function using K –Map method in POS

form. F= ℼ (2,3,4,6,9,11,12,13).

CD
AB 00 01 11 10

00 0 0

0 0
01

11 0 0

10
0 0
Code converts using Karnaugh Method
4 Bit binary to gray code converter:
BINARY (I/P) GRARY (O/P)
MINTERM
B4 B3 B2 B1 G4 G3 G2 G1
0 0 0 0 0 0 0 0 0
1 0 0 0 1 0 0 0 1
2 0 0 1 0 0 0 1 1
3 0 0 1 1 0 0 1 0
4 0 1 0 0 0 1 1 0
5 0 1 0 1 0 1 1 1
6 0 1 1 0 0 1 0 1
7 0 1 1 1 0 1 0 0
8 1 0 0 0 1 1 0 0
9 1 0 0 1 1 1 0 1
10 1 0 1 0 1 1 1 1
11 1 0 1 1 1 1 1 0
12 1 1 0 0 1 0 1 0
13 1 1 0 1 1 0 1 1
14 1 1 1 0 1 0 0 1
15 1 1 1 1 1 0 0 0
Excess-3 to BCD code Converter
BCD to Excess-3 code Converter

You might also like