0% found this document useful (0 votes)
20 views43 pages

K Map

The document provides an overview of Karnaugh Maps (K-Maps) used for simplifying Boolean functions in digital electronic circuits. It explains the concepts of Sum of Products (SOP) and Product of Sums (POS) forms, minterms, and the graphical representation of truth tables using K-Maps. The document also discusses methods for simplification, including handling don't care conditions and selecting essential prime implicants.

Uploaded by

vigneshsai282
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)
20 views43 pages

K Map

The document provides an overview of Karnaugh Maps (K-Maps) used for simplifying Boolean functions in digital electronic circuits. It explains the concepts of Sum of Products (SOP) and Product of Sums (POS) forms, minterms, and the graphical representation of truth tables using K-Maps. The document also discusses methods for simplification, including handling don't care conditions and selecting essential prime implicants.

Uploaded by

vigneshsai282
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/ 43

EE276 – Digital Electronic Circuits

Karnaugh Maps (K-Map)

1
Introduction
Two standard algebraic forms of a Boolean function:

• SOP form – Sum of Products form – Minterm expansion


SOP expression – realized by one or more AND gated feeding a single OR gate at
the circuit output.

• POS form – Product of Sum form – Maxterm expansion


POS expression – realized by one or more OR gates feeding a single AND gate at
the circuit output.

2
Contd….
• Minimum cost two-level AND-OR gate circuits
–need to find minimum expressions in sum of products or products
of sums form.

• Design task – find an optimal gate-level implementation of


the Boolean functions describing a digital circuit.
3
Terminology: Minterms
A minterm is a special product of literals, in which each input
variable appears exactly once.
A function with n variables has 2n minterms (since each variable
can appear complemented or not)
A three-variable function, such as f(x,y,z), has 23 = 8 minterms:
x’y’z’ x’y’z x’yz’ x’yz
xy’z’ xy’z xyz’ xyz

Each minterm is true for exactly one combination of inputs:


Minterm Is true when… Shorthand
x’y’z’ x=0, y=0, z=0 m0
x’y’z x=0, y=0, z=1 m1
x’yz’ x=0, y=1, z=0 m2
x’yz x=0, y=1, z=1 m3
xy’z’ x=1, y=0, z=0 m4
xy’z x=1, y=0, z=1 m5
xyz’ x=1, y=1, z=0 m6
xyz x=1, y=1, z=1 m7
4
Terminology: Sum of minterms form
Every function can be written as a sum of minterms, which is a special
kind of sum of products form
The sum of minterms form for any function is unique
If you have a truth table for a function, you can write a sum of minterms
expression just by picking out the rows of the table where the function
output is 1.
x y z f(x,y,z) f’(x,y,z)
0 0 0 1 0
f = x’y’z’ + x’y’z + x’yz’ + x’yz + xyz’
0 0 1 1 0 = m 0 + m1 + m 2 + m 3 + m 6
0 1 0 1 0 = m(0,1,2,3,6)
0 1 1 1 0
f’ = xy’z’ + xy’z +
1 0 0 0 1
xyz
1 0 1 0 1
1 1 0 1 0
= m 4 + m5 + m 7
1 1 1 0 1 = m(4,5,7)
f’ contains all the minterms not in f
5
Karnaugh Maps (K-Map)
A K-Map is a graphical representation of a logic function’s truth table

The K-map can be viewed as


A reorganized version of the truth table
A topologically-warped Venn diagram as used to visualize sets in algebra
of sets

𝑥𝑦
𝑥𝑦 𝑥𝑦

xa 𝑥𝑦 yb

6
Contd….
m0
m2 m1
x m3 by
a

y y

0 1
m0 𝑚1

x x 2 3
𝑚2 m3
7
Contd..
y 0 1
x
0 1 • Four minterms for two variables –
0 two variable K-map
four squares for each minterm.

1 2 3

8
Two variable Karnaugh maps
• Consider the truth table for a function F

• K-map constructed as shown

• A’B’ and A’B are the minterms (indicated by 1’s in the squares of K-
map)
9
Contd…
• Minterms in the adjacent squares of the map can be combined –
differ by only one variable.

• Combine the minterms as shown in Fig – loop the ones – express F


as F = A’.

10
Contd…
• Minterms in the adjacent squares of the map can be combined –
differ by only one variable.

• Combine the minterms as shown below – loop the ones – express F

11
Three variable Karnaugh maps
• 8 minterms for 3 binary variables – K-map with 8 squares.

• Arrangement of minterms – sequence similar to gray code(not in a


binary sequence).

• Gray code – only one bit changes in value from one adjacent column
to the next.

12
Contd..

• Location of minterms for a three variable K-map.

• Minterms in the adjacent squares of the map differ in only one


variable – facilitates the application of theorem to combine the
variables.

13
Contd..

• Two squares differ by the variable y – remove y – form the sum


of minterms.

• Any two minterms in adjacent squares (vertically, horizontally , not


diagonally) can be combined – OR ed together – removing
dissimilar variable.
m0 and m2 – adjacent squares, m4 and m6 – adjacent squares.
14
Example…
• Simplify the Boolean function:

15
Èxample…
• Simplify the Boolean function:

16
Contd..
• Any combination of four adjacent squares in the three-variable map –
represents the logical sum of four minterms.

• Simplification by combining four adjacent squares – simplified


expression with one literal.

17
Example
• Simplify the Boolean function:

18
Summary

19
Example
• Simplify the Boolean function:

20
Four variable Karnaugh maps
• Location of minterms on a four-variable map.

• First and last columns are also adjacent, first and last rows are also adjacent.

21
Contd..

22
Example..

23
Example

24
Five variable Karnaugh maps
• Boolean functions with five variables can be simplified using a 32-cell
Karnaugh map.
• Actually, two 4-variable maps (16 cells each) are used to construct a 5-
variable map.
• A Karnaugh map for five variables (ABCDE) can be constructed using two
4-variable maps with which you are already familiar.
• Each map contains 16 cells with all combinations of variables 8, C, D, and
E.
• One map is for A = 0 and the other is for A = I, as shown on the next slide.

25
• The best way to visualize cell adjacencies between the two 16-cell maps
is to imagine that the A = 0 map is placed on top of the A = 1 map.

• Each cell in the A = 0 map is adjacent to the cell directly below it in the A
= 1 map.

26
Cell adjacency
Each cell in the A = 0 map is
adjacent to the cell directly
below it in the A = I map.

The simplified expression taken from the


map is developed as follows
• The term for the yellow group is DE’.
• The term for the orange group is B’CE.
• The term for the light red group is A’BD’.
• The term for the gray cell grouped with
the red cell is BC’ D’E.
• The final SOP expression is,
X = DE’ + B’CE + A’BD’ + BC’ D’E

27
Example

28
PoS Simplification
Minimum PoS expression:

29
Contd…
Minimum PoS expression:

30
Contd…

Minimum SoP expression:

By combining adjacent
zero’s

Minimum PoS expression:

31
Don’t care in K Maps
It is possible that a Boolean function is not specified for certain combination
of the variables.

Example – four binary code for the decimal digits – 6 unused combinations –
not specified.

Incompletely specified functions – functions that have unspecified outputs


for some input combinations.

Don’t-Care conditions – unspecified minterms of a function – mark the


don’t care condition in the K-map by X – don’t care whether the value of
0 or 1 is assigned to F for the particular minterm.

Minterm SoP expression – condition under which the Boolean function


is equal to 1.

Boolean function value = 0 for rest of the minterms. 32


Contd…
Don’t care the value of F – input combinations never occur anyway.

A’B’C and ABC’ – don’t care minterms.

33
Contd…
Don’t care the value of F – input combinations never occur anyway.

A’B’C and ABC’ – don’t care minterms

34
Contd…
Simplification – include each don’t care minterm with either the 1’s or
the 0’s.

35
Contd…
Simplification – include each don’t care minterm with either the 1’s or
the 0’s.

Two expressions – two algebraic functions – algebraically not equal.

Specified minterms are covered – a different don’t care minterm is


covered in two expressions.
36
Systematic Simplification
▪ A Prime Implicant is a product term obtained by combining the
maximum possible number of adjacent squares in the map into a
rectangle with the number of squares a power of 2.
▪ A prime implicant is called an Essential Prime Implicant if it is the
only prime implicant that covers (includes) one or more minterms.
▪ Prime Implicants and Essential Prime Implicants can be determined
by inspection of a K-Map.
▪ A set of prime implicants "covers all minterms" if, for each minterm
of the function, at least one prime implicant in the set of prime
implicants includes the minterm.

37
Prime Implicant Selection Rule
• Minimize the overlap among prime implicants as much as possible. In
particular, in the final solution, make sure that each prime implicant
selected includes at least one minterm not included in any other
prime implicant selected. Simplify F(A, B, C, D) given on the K-map.
Essential
CD C Selected CD C
AB AB

1 1 1 1

1 1 1 1 1 1 1 1
B B
1 1
A A
1 1 1 1

D D
Minterms covered by essential prime implicants
38
Example
Find ALL Prime Implicants

CD ESSENTIAL Prime Implicants


CD
C C
AB BD
BD 1 1 1 1 1 1

BD 1 1 BD 1 1
B B
1 1 1 1
A A
1 1 1 1 1 1 1 1
AB
D D
AD Minterms covered by single prime implicant
39
Example
Find all prime implicants for:
G(A,B,C,D) = Σm(0,2,3,4,7,12,13,14,15)
Hint: There are seven prime implicants!

40
Contd…

Determine the essential prime implicants.

Simplified sum = essential prime implicants + other prime implicants needed


to cover any remaining minterms not covered by the essential prime
implicants. 41
Guidelines for Simplifying Functions
 Each square on a K-map of n variables has n logically
adjacent squares. (i.e. differing in exactly one variable)
 When combing squares, always group in powers of 2m ,
where m=0,1,2,….
 In general, grouping 2m variables eliminates m variables.

 Group as many squares as possible. This eliminates the


most variables.
 Make as few groups as possible. Each group represents a
separate product term.
 You must cover each minterm at least once. However, it
may be covered more than once.

42
K-map Simplification Procedure

 Plot the K-map


 Circle all prime implicants on the K-map
 Identify and select all essential prime implicants for the
cover.
 Select a minimum subset of the remaining prime
implicants to complete the cover.
 Read the K-map

43

You might also like