0% found this document useful (0 votes)
24 views39 pages

Unit 20 - Lecture 04

The document discusses Karnaugh maps, which are a method for simplifying Boolean logic expressions by grouping variables in a two-dimensional grid. Karnaugh maps allow variables to be removed from logic expressions in a graphical manner. The document explains how to construct, analyze, and use Karnaugh maps to minimize expressions into sum of products form.

Uploaded by

Kusal Dananjaya
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)
24 views39 pages

Unit 20 - Lecture 04

The document discusses Karnaugh maps, which are a method for simplifying Boolean logic expressions by grouping variables in a two-dimensional grid. Karnaugh maps allow variables to be removed from logic expressions in a graphical manner. The document explains how to construct, analyze, and use Karnaugh maps to minimize expressions into sum of products form.

Uploaded by

Kusal Dananjaya
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/ 39

DIGITAL PRINCIPLES

Lecture 4
Karnaugh Maps
AB
00 01 11 10
Karnaugh Maps C

0
1

▪ K-maps present a truth table in a form that allows variables to be removed


from the final logic expression in a graphical manner.

▪ A K-map is constructed as a two-dimensional grid. No. of cells = 2n (n= no.


of variables)

▪ Each cell within the map corresponds to the output for a specific input
code.
▪The cells are positioned such that neighboring cells only differ by one bit in
their input codes.
▪ Neighboring cells are defined as cells immediately adjacent horizontally
and immediately adjacent vertically.
▪Two cells positioned diagonally next to each other are not considered
neighbors.
▪The input codes for each variable are listed along the top and side of the K-
map.
A B Y A
B 0 1
0 0 0
0 1 1 0
1 0 1
1 1 1
1
A B C Y
0 0 0 1
0 0 1 0 AB
00 01 11 10
C
0 1 0 1
0 1 1 1 0
1 0 0 0
1
1 0 1 0
1 1 0 1
1 1 1 1
A B C D Y
0 0 0 0 1
0 0 0 1 0 AB
00 01 11 10
0 0 1 0 0 CD
0 0 1 1 1
0 1 0 0 1 00
0 1 0 1 1
0 1 1 0 0
01
0 1 1 1 0
1 0 0 0 0
1 0 0 1 0 11
1 0 1 0 0
1 0 1 1 1 10
1 1 0 0 1
1 1 0 1 0
1 1 1 0 0
1 1 1 1 1
A ഥ
A A
B

B ഥB
A ഥ ഥ
AB
B ഥ
AB AB
3 Variable K maps
A B C F AB
C
00 01 11 10
0 0 0 1
0
0 0 1 0
0 1 0 1 1
0 1 1 1
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 1
4 Variable K maps
AB 00 01 11 10
CD
00 1 1
01 1 1
11 1
10 1
Mapping a Standard SOP expression
ഥC + ABCത + ABC
ABC + AB ഥ AB 00 01 11 10
C
111 + 101 + 110 + 011 0

Mapping a Nonstandard SOP expression


First convert the given expression in to standard form & then perform the above
procedure
A’B’CD + A’BC’D’ + ABC’D + ABCD + ABC’D’ + A’B’C’D + AB’CD’

AB 00 01 11 10
CD
00
01
11
10
ഥ +ABCത D+ AB
ABCD ഥBC
ഥC + A

AB 00 01 11 10
CD
00
01
11
10
K Map Simplification
Obtaining minimum SOP expression
Step 1 : Grouping 1s
Step 2 : Determining the minimum SOP expression from the map

Grouping 1s (Enclosing adjacent cells containing 1s)


The goal is to maximize the size of the groups and to minimize the number of groups.
1. A group must contain 2n no. of cells(n=0,1,2,3,4,5..) (No.of Cells = 1,2,4,8,or 16).
2. Each cell in a group must be adjacent to one or more cells in that same group.
3. Always include the largest possible number of 1s in a group in accordance with rule 1.
4. Each 1 on the map must be included in at least one group. The 1s already in a group can be
included in another group as long as the overlapping groups include non common 1s.
These groups are known as Prime Implicants.
AB AB
C 00 01 11 10 C 00 01 11 10
0 1 1 1 0 0 1 0 0 1
1 0 1 1 0 1 1 1 1 1
Determining the minimum SOP expression from the map

Rules:
1. Each group of cells containing 1s creates one product term composed of all
variables that occur within the group. Variables that occur both un-complemented
and complemented within the group are eliminated.
2. Determine the minimum product term for each group.
3. Minimum product terms are summed to form the minimum SOP expression.
Determining Minimum Product Terms
AB
C 00 01 11 10
B
0 1 1 1 0
1 0 1 1 0
ഥ Cത
A
For a 3-variable map: ഥCത
Minimum SOP Expression = B + A
1-cell group yields a 3-variable product term
2-cell group yields a 2-variable product term
4-cell group yields a 1-variable term
8-cell group yields a value of 1 for the expression
3 Variable K maps
A B C F AB
C
00 01 11 10
0 0 0 1
0
0 0 1 0
0 1 0 1 1
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 1
Example

1. Map the following SOP expression on a Karnaugh Map. AB 00 01 11 10


CD
a) ഥ Cത + A B
B ഥ + ABCത + AB
ഥ CD ഥB
ഥ+A ത + AB
ഥCD ഥCD
00
b) A + Cത D + ACD ഥ D
ഥ +ABC ഥ
01

11

10
A + Cത D + ACD ഥ D
ഥ +ABC ഥ AB 00 01 11 10
CD

00

01

11

10
2. Use a K – map to minimize the following standard SOP expressions.

a) AB’C + A’BC + A’B’C + A’B’C’ + AB’C’

b) B’C’D’ + A’BC’D’ + ABC’D’ + A’B’CD + AB’CD + A’B’CD’ + ABCD’ + AB’CD’

AB 00 01 11 10 AB 00 01 11 10
C CD

0 00

1 01

11

10
Observing Redundant Prime Implicants in a K map
Step 1: Find all possible prime implicants in the K map
Step 2: Identify distinguished one cells (A cell that is covered only by one prime implicant)
Step 3: Identify essential Prime implicants
Step 4: Remove non essential prime implicants

AC’

BC AB

AB + BC + AC’
Don’t Care Conditions
• Sometimes a situation arises in which some input variable combinations are not
allowed.
• For example, in the BCD code , there are six invalid combinations. 1010, 1011, 1100,
1101, 1110, 1111
• These states never occur in an application involving the BCD code, they can be
treated as "don't care" terms with respect to their effect on the output.
• In K maps each "don't care" term, an X is placed in the cell.
• When grouping the 1s, the Xs can be treated as 1s to make a larger grouping.
A B C D Decimal
0 0 0 0 0
0 0 0 1 1
0 0 1 0 2
BCD – Binary Coded Decimal 0 0 1 1 3
0 1 0 0 4
0 1 0 1 5
0 1 1 0 6
0 1 1 1 7
1 0 0 0 8
1 0 0 1 9
1 0 1 0 X
1 0 1 1 X
1 1 0 0 X
1 1 0 1 X
1 1 1 0 X
1 1 1 1 X
A B C D Output
Example
0 0 0 0 0
0 0 0 1 0
0 0 1 0 0 AB 00 01 11 10
CD
0 0 1 1 0
0 1 0 0 0 00
0 1 0 1 0
01
0 1 1 0 0
0 1 1 1 1 11
1 0 0 0 1
1 0 0 1 1 10
1 0 1 0 X
1 0 1 1 X
1 1 0 0 X
1 1 0 1 X
1 1 1 0 X
1 1 1 1 X
AB AB 00 01 11 10
00 01 11 10 CD
CD

00 0 0 X 1 00 0 0 X 1

01 0 0 X 1 01 0 0 X 1
A
11 0 1 X X 11 0 1 X X

10 0 0 X X 10 0 0 X X

ഥ 𝐁CD ഥC
A𝐁
BCD 𝐀

Y = A + BCD ഥBCD + AB
Y=A ഥC
Mapping a Standard POS expression
• For a standard POS expression in a standard form, a 0 is placed on the K – map for
each sum term in the POS expression.

• A + B’ + C - 010 >>>> 0

• Number of 0s on the K – map = No.of Sum terms in the expression.

Step 1: Determine the binary value for each sum term

Step 2: Place 0 on K map in corresponding cell


Example
Map the following POS expressions on a K –map.

1. (A’+B’+C+D) (A’+B+C’+D’) (A+B+C’+D) (A’+B’+C’+D’) (A+B+C’+D’)

2. (A+B’+C’+D) (A+B+C+D’) (A+B+C+D) (A’+B+C’+D)

AB 00 01 11 10
CD

00

01

11

10
K – Map Simplification : POS expression

• Grouping 0s to produce minimum sum terms

• Get the product of determined sum terms


Obtaining minimum POS expression

Sum
(B+C+D) (A+B+C’+D) (A’+B+C+D’) (A+B’+C+D) (A’+B’+C+D)

AB 00 01 11 10
CD

00

01

11

10
Conversion between POS & SOP using K- Map

(A’+B’+C+D) (A+B’+C+D) (A+B+C+D’) (A+B+C’+D’) (A’+B+C+D’) (A+B+C’+D)

Convert the above expression in to standard SOP & minimum SOP expression.

AB 00 01 11 10
CD

00

01

11

10
5 Variable K- Maps
• Use 2, 4 variable K- Maps
BC 00 01 11 10 BC 00 01 11 10
DE DE A BC’ DE’ = 1 10 10 = 1
00 00
A’BCDE’ = 01110

01 01

11 11

10 1 10 1

A=0 A=1
Imagine the A=0 map is placed on the top of the A= 1 map.
Then Each cell in the A = 0 map is adjacent to the cell directly below it in the A = 1 map.
BC 00 01 11 10
DE

00 0 0 0 1 B𝐂ത ഥ𝐄
C𝐃
01 0 1 1 1
A=0
11 1 1 0 1
ത 𝐃
Y= B𝐂+C ഥ 𝐄+ 𝐀
ഥ𝐁ഥ +A𝐁
ഥ CD𝐄ത
10 1 1 0 1

BC 00 01 11 10
ഥ𝐁
𝐀 ഥ DE

00 0 0 0 1
A=1
01 0 1 1 1

11 0 0 0 1 ഥ CD𝐄ത
A𝐁
10 0 1 0 1
A’B’C’D’E’ + A’B’CD’E’ + A’BCD’E’ + A’BC’D’E’ + A’B’C’D’E + A’BCD’E + A’BCDE +
AB’C’D’E’ + AB’C’D’E + ABCD’E + ABCDE + AB’CDE

BC 00 01 11 10 BC 00 01 11 10
DE DE

00 00

01 01

11 11

10 10

A=0 A=1
Thank You!

You might also like