0% found this document useful (0 votes)
7 views

k-mapping

Uploaded by

syedsahib2922
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)
7 views

k-mapping

Uploaded by

syedsahib2922
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/ 36

Karnaugh

What are Karnaugh Maps?

A simpler way †o handle mos† (bu† no†


all) jobs of mani ula†in logic functions.
Karcaugh Advantages

• Minimization can be done more sys†ema†ically


• Much simpler †o find minimum solutions
• Easier †o see wha† is happening (graphical)

Almost always used instead


of boolean minimization.
Gray Codes

• Gray code is a binary value encoding in which


adjacen† values only differ by one bi†

2-bi† Gray
Code
00
01
11
10
Truth Table Adjacencies
A B
These are adjacent in a 9nay code sense -
0 0
†hey differ by 1 bi†
F = A’
We can apply XY + XY’ = X

A'B’ + A'B = A’(B'+B) A’(1) = A

O 0
F=B Some idea:

A'B + AB = B

Key idea: Problem:

Gray code adjacency allows use of Physical adjacency in †ruth †abIe does
simplification theorems not indicate gray code adjacency
2-Variable Karnaugh

A=1, B=0
A-0, B—0

A-1, B-1
A-0, B-1

A differen† way †o draw a †ru†h †abIe: by folding i†


Karnaugh

• In a K-map, physical adjacency does imply


gray code adjacency

A A
B 0 1 B 0 1
0 1 0 0 0
‹ 0 1

F =A’B’ + A'B = A’ F = A'B + AB B


2-Variable Karnaugh

A B F
0 0 1
0 1 1
1 0 0
1 1 0
2-Variable Karnaugh

A B F
A
0 0 1 0 1
B
0 1 1
0
1 0 0
1 1 0

,
2-Variable Karnaugh

A B F
A
0 0 1 0 1
0 1 1
1
1 0 0
1 1 0 1

,
2-Variable Karnaugh

A B F
A
0 0 1 0 1
B
0 1 1
-0
1 0 0
1 1 0 *0

,
2-Variable Karnaugh

A B F
A
0 0 1 0 1
B
0 1 1
0 1 0
1 0 0
1 1 0 1 1 0

F = A'B’ + A'B = A’
,
2-Variable Karnaugh

A B F
A
0 0 1 0 1
B
0 1 1
0
1 0 0
1 1 0 0

A=0
,
F = A’
Another Example

A B F A
0 0 0 B 0 1
0 1 1
0 0 1
1 0 1
1 1 1
1 1 1
F = A'B + AB’ + AB
(A'B + AB) + (AB’ + AB)
= A+ B
Another Example

A B F A
0 0 0
0 1 1
1 0 1
A= 1
1 1 1
B=1

F= A+ B
Yet Another Example

A B F A
0 0 1 B
0 11
10 1
111
F =1

Groups of more †han †wo 1's can be combined


3-Variable Karnaugh Map Showing
Min†erm Locations
A
BC o 1
No†e †he order of 00
the B C variables:
01 •
00 ABC 101
01 11
11
10
10

ABC = 010
3-Variable Karnaugh Map Showing
Min†erm Locations
A
BC 0 1
No†e †he order of 00 m0 m4
the B C variables:
01 m1 m5 •
00 ABC 101
01 11 m3 m7
11 10 m2 m6
10

ABC = 010
Adjaceccies

• Adjacent squares differ by exactly one


variable
A
0

00 AB'C'
There is wrap around:
01 A'B’C AB'C t O p Ctnd bot†om rows are adJ•Ce n †

11 ABC

10 ABC'
Truth Table to Karnaugh

A B C F A
0 0 0 0 BC 0 1
0 0 1 0
oo 0 0
0 1 0 1
0 1 1 1 01 0 1
1 0 0 0 11 1 1
1 0 1 1
10 1 0
1 1 0 0
1 1 1 1
Example
A
BC 0 1

« o o AB C+ABC = AC

01 0

11 1 1

0
A’BC+A'BC’ = A'B

F = A'B + AC
Another Example
A
BC o
oo 0
01 1 0 AB’C’+ABC’ = AC'
A’B’C+A’BC = A'C
11 0
10 0 1

F = A'C + AC’ = A ⊕ C
Min†erm Expression †o

F = σ m(1, 3, 4, 6 )

A A
BC 0 1 BC 0 1
00 m0 m4 00 0 1

01 m1 m5 01 1 0

11 m3 m7 11 1 0

10 m2 m6 10 0 1

Min†erms are †he 1’s, everything else is 0


Maxterm Expansion to

F = ς M( 0, 2, 5, 7 )

A A
0 1 BC 0 1
00 M0 M4 00 0 1
01 M1 M5 01 1 0

11 M3 M7 11 1 0

10 M2 M6 10 0 1

Max†erms are †he 0’s, everything else is 1


Yet Another Example
2n 1's can be circled a† a †ime
A 1, 2, 4, 8, OK
BC 3 not OK

A’B’C’+AB’C’+A’B’C+AB’C = B’

AB’C+ABC = AC

F = B’ + AC

The larger the group of 1’s


†he simpler †he resul†ing Product term
Boolean Algebra to Karnaugh

Plo†: ab'c’ + be + a’
A
BC
Boolean Algebra to Karnaugh

Plo†: ab'c’ + be + a’
A
BC 0 1
00
01

11

10
Boolean Algebra to Karnaugh

Plo†: ab'c’ + bc + a’
A
BC 0 1
00 1
01

11 1 1
10
Boolean Algebra to Karnaugh

Plo†: ab'c’ + bc + a’

BC
00

01

10
Boolean Algebra to Karnaugh

Plo†: ab'c’ + bc + a’
A
BC 0 1
00 1 1
01 1 0
Remaining
11 1 1
spaces are 0
10 1 0
Boolean Algebra to Karnaugh

Now minimize . .

A
BC
00 F = B'C’ + BC + A’
01

This is a simpler equation


10 †han we started with.

Do you see how we obtained it?


Sum of Product Terms
The 3—variable map has 12 possible groups of 2 spaces

These become terms with 2 liberals

A A A
BC BC BC
00

01 01 01

11

10
Sum of Product Terms
The 3—variable map has 6 possible groups of 4 spaces

These become terms with 1 literal


A A A
BC 1 BC
00 00

01 01

10
4-Variable Karnaugh
AB AB
CD 00 01 11 10 CD 00 01 11 10

00 m0 m4 m12 m8 00 0 0 0 1
01 1 1 1 1
01 m1 m5 m13 m9 AB'C’
11 m3 m7 m15 m11 1 1 1 1
10 m2 m6 m14 m10 1 0 0
D
A'BC
F = A'BC + AB'C’ + D

No†e †he row


and column orderings.

Required for adjacency


Dealing With Don't Cares Condition

F = σ m(1, 3, 7)+ σ d(0, 5) A


BC 0 1
00

01

11

10
Dealing With Don't Cares
F = σ m(1, 3, 7) +σ d(0, 5)
A
BC 0 1

00 X

01 1 x
A’B’C+AB’C+A’BC+ABC C
11 1 1

10 0 0

F=G
Circle †he x's †ha† help ge† bigger groups of 1’s (or 0‘s if POS)
Don’t circle the x's that don't

You might also like