0% found this document useful (0 votes)
14 views42 pages

07 Karnaugh Maps

lesson material

Uploaded by

LEBRON JAMES
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)
14 views42 pages

07 Karnaugh Maps

lesson material

Uploaded by

LEBRON JAMES
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/ 42

Internal Use

Karnaugh Maps
CPE107-4 Logic Circuits and Design
Engr. John Paul T. Cruz
Internal Use

Objectives
• Plot Boolean functions on a Karnaugh Map in minterm, maxterm, or algebraic form.
• Obtain the minimum sum of products or minimum product of sums form of a function from
a K-Map.
• Understand the relation between operations performed using the map and the
corresponding algebraic operations.
• Determine the implicants and essential prime implicants of a function from a K-Map.
Internal Use

Introduction
Logic Expressions can be simplified algebraically using Boolean Theorems. However, two
problems arise when algebraic procedures are used:
1. The procedures are difficult to apply systematically.
2. It is difficult to tell when you have arrived at a minimum solution.

A Karnaugh Map (K-Map) provides a systematic method for simplifying logic expressions. A
K-Map will produce a minimum form of the logic Boolean function when properly used.
Internal Use

Minimum Forms
A minimum SOP/POS expression is defined as an SOP/POS term with a minimum number
of terms and a minimum number of literals. Minimum forms correspond directly to a gate
circuit with a minimum number of gates and gate inputs.

Given a minterm or a maxterm expansion, the minimum form can be obtained by combining
and factoring like terms to eliminate as many literals as possible and to eliminate redundant
terms using consensus theorem or any application theorems.

Example:
𝐹 𝑎, 𝑏, 𝑐 = ෍ 𝑚 (0,1,2,5,6,7)

Minimum SOP: 𝐹 𝑎, 𝑏, 𝑐 = 𝑎′ 𝑐 ′ + 𝑏 ′ 𝑐 + 𝑎𝑏
Minimum POS: 𝐹 𝑎, 𝑏, 𝑐 = (𝑎 + 𝑏′ + 𝑐 ′ )(𝑎′ + 𝑏 + 𝑐)
Internal Use

Minimum Forms
Obtain the minimum form of the function below: 𝐹 𝑎, 𝑏, 𝑐 = σ 𝑚 (0,1,2,5,6,7)
Internal Use

Minimum Forms
The uniting theorem 𝑋𝑌 ′ + 𝑋𝑌 = 𝑋 can be applied to minterms and products where they are
represented in algebraic or binary notation. Minterms can only be combined if they differ in
one variable, and products only combine if they have dashes in the same position (same
missing variables) and differ in one other variable.
Internal Use

Karnaugh Map
A K-Map is a systematic way of simplifying logic expressions and lead directly to minimum
cost gate circuits composed of basic gates.

The K-Map is similar to a truth table, but instead of being organized into columns and rows,
it is an array of cells in which each cell represents a binary value of the input variables.
Typically used K-Maps are from 2 variables up to 5 variables.
Internal Use

Two-Variable K-Map
Internal Use

Two-Variable K-Map

Each 1 on the map corresponds to a minterm of F. We can read the minterms from
the map just like we can read them from the truth table. Minterms in adjacent
squares of the map can be combined since they differ in only one variable
Internal Use

Three-Variable K-Map

In a three-variable k-map, the sequence of the numbers


is listed so that values in adjacent rows differ in only
one variable. This sequence is known as gray code
Internal Use

Three-Variable K-Map
Internal Use

Three-Variable K-Map
Internal Use

Three-Variable K-Map

𝐹 𝑎, 𝑏, 𝑐 = ෍ 𝑚 (1, 3, 5)

𝐹 𝑎, 𝑏, 𝑐 = ෑ 𝑀 (0, 2, 4, 6, 7)

Given a truth table, minterm expansion, or canonical


form of any function; it can be plotted on a map by
placing 1’s in the squares corresponding to the
function’s minterms and 0’s for the maxterms.
Internal Use

Three-Variable K-Map
In three-variable Karnaugh maps, each group of cells contains the following conditions:
• One square represents a minterm or maxterm of 3 literals
• A group of 2 squares represents a term of 2 literals.
• A group of 4 squares represents a term of 1 literal.
• A group of 8 squares produces a function equal to 0 or 1.
Internal Use

Three-Variable K-Map

If a function is given in
algebraic form, plot
each product term
directly as a group of
1s on the map.
Internal Use

Three-Variable K-Map
Internal Use

Three-Variable K-Map
Internal Use

Three-Variable K-Map

A function can have two


or more minimum forms
that can be determined
from the map
Internal Use

Four-Variable K-Map
Internal Use

Four-Variable K-Map
In four-variable Karnaugh maps, each group of cells contains the following conditions:
• One square represents a minterm or maxterm of 4 literals
• A group of 2 squares represents a term of 3 literals.
• A group of 4 squares represents a term of 2 literals.
• A group of 8 squares represents a term of 1 literal.
• A group of 16 squares produces a function equal to 0 or 1.
Internal Use

Four-Variable K-Map
Internal Use

Five-Variable K-Map
Internal Use

Five-Variable K-Map
Internal Use

Five-Variable K-Map

𝐹(𝐴, 𝐵, 𝐶, 𝐷, 𝐸) = Σ 𝑚 (0, 7, 8, 9, 12, 13, 15, 18, 20


22, 23, 24, 25, 28, 29, 31)
Internal Use

Five-Variable K-Maps
In five-variable Karnaugh maps, each group of cells contains the following conditions:
• One square represents a minterm or maxterm of 5 literals
• A group of 2 squares represents a term of 4 literals.
• A group of 4 squares represents a term of 3 literals.
• A group of 8 squares represents a term of 2 literals.
• A group of 16 squares represents a term of 1 literal.
• A group of 32 squares produces a function equal to 0 or 1.
Internal Use

K-Map Simplification Rules


Use the following cell grouping rules to obtain the minimum SOP/POS expression.
1. Group size must only be in 2N (1, 2, 4, 8… etc.)
2. Groups must not include any cell including zero/one.
3. Groups must be horizontal or vertical, with no diagonal groups.
4. Groups must be as large as possible.
5. Each cell containing 1/0 must be in at least one group.
6. Groups may overlap.
7. Groups may wrap around the table.
8. There should be as few groups as possible without contradicting any previous rules.
Internal Use

Simplifying Logic Expressions


Internal Use

Simplifying Logic Expressions


Internal Use

Simplifying Logic Expressions


Internal Use

Simplifying Logic Expressions

Don’t Care Conditions


• Represented as an X
• Can be 0 or 1
• Represents invalid or impossible conditions
• Used only when necessary and if needed
to maximum groups.
Internal Use

Simplifying Logic Expressions

𝐹 = Σ 𝑚 (0, 1, 4, 5, 13, 15, 20, 21,


22, 23, 24, 26, 28, 30, 31)

𝐹 = 𝑨′ 𝑩′ 𝑫′ +
𝑨𝑩𝑬′ +
𝑨𝑪𝑫 +
𝑨′ 𝑩𝑪𝑬 +
𝑩′ 𝑪𝑫′
Internal Use

Simplifying Logic Expressions

𝐹 = Σ 𝑚 (0, 1, 4, 5, 13, 15, 20, 21,


22, 23, 24, 26, 28, 30, 31)

𝐹 = 𝑨′ 𝑩′ 𝑫′ +
𝑨𝑩𝑬′ +
𝑨𝑪𝑫 +
𝑨′ 𝑩𝑪𝑬 +
𝑨𝑩′ 𝑪
Internal Use

Implicants and Prime Implicants


Given a function, F of n variables, a product term, or a sum term P/S is an implicant of F if
and only if for every combination of values of the n variables for which P = 1 (product term)
or S = 0 (sum term), F is also equal to 1 (SOP) or 0 (POS). In other words, if for some
combination of values of the variables, P = 1 and F = 0 (for SOP) or S = 0 and F = 1 (for
POS), then P is not an implicant of F.

A prime implicant of a function F is a product term implicant or a sum term implicant, which
is no longer an implicant if any literal is deleted from it or cannot be combined with another
term to eliminate a variable.

Prime
Implicants
Implicants
Internal Use

Implicants and Prime Implicants

a’b’c, a’cd’, and ac’ are prime


implicants because they cannot
be combined with other terms
to eliminate a variable.

a’b’c’d’ is not a prime implicant


because it can be combined
with a’b’cd’ or ab’c’d’. Neither
abc’ nor ab’c’ is a prime
implicant because these terms
can be combined to form ac’
Internal Use

Implicants and Prime Implicants


All the prime implicants of a function can be obtained from a Karnaugh Map. A single 1 or 0
on a map represents a prime implicant if it is not adjacent to other cells. Two adjacent cells
on a map form a prime implicant if they are not contained in a group of four cells. Four
adjacent cells form a prime implicant if they are not contained in a group of eight cells, etc.

The minimum expression for a function consists of some (but not necessarily all) of the
prime implicants of a function. In other words, a sum of products or product of sums
expression containing a term not a prime implicant cannot be minimum. A prime implicant
composed of don’t care conditions can never be part of the minimum solution. The minimum
expression is the minimum number of prime implicants which cover all of the 1’s or 0’s on
the map.
Internal Use

Implicants and Prime Implicants


Internal Use

Implicants and Prime Implicants


Internal Use

Implicants and Prime Implicants

If a minterm/maxterm is covered by
only one prime implicant, that prime
implicant is said to be essential, and
it must be included in the minimum
expression.

In other words, an essential prime


implicant is a prime implicant that
includes at least one minterm that is
not in any other prime implicant.
Internal Use

Examples
Plot the following function on a Karnaugh Map and determine the minimum sum of products
and minimum product of sums: 𝐹 𝐴, 𝐵, 𝐶, 𝐷 = 𝐵𝐷 ′ + 𝐵′ 𝐶𝐷 + 𝐴𝐵𝐶 + 𝐴𝐵𝐶 ′ 𝐷 + 𝐵′ 𝐷′

Determine the minimum sum of products and minimum product of sums expressions for
term: 𝑓(𝑎, 𝑏, 𝑐, 𝑑) = 𝑏 ′ 𝑐 ′ 𝑑 ′ + 𝑏𝑐𝑑 + 𝑎𝑐𝑑 ′ + 𝑎′ 𝑏′𝑐 + 𝑎′ 𝑏𝑐 ′ 𝑑

Determine the minimum sum of products expression for term:


𝑓 𝑎, 𝑏, 𝑐, 𝑑, 𝑒
= (𝑎′ + 𝑐 + 𝑑)(𝑎′ + 𝑏 + 𝑒)(𝑎 + 𝑐 ′ + 𝑒 ′ )(𝑐 + 𝑑 + 𝑒 ′ )(𝑏 + 𝑐 + 𝑑 ′ + 𝑒)(𝑎′ + 𝑏 ′ + 𝑐 + 𝑒 ′ )
Internal Use

Examples
Find the minimum sum-of-products expression for each function. List all the prime
implicants and determine which minterm/s makes the corresponding prime implicant
essential.
𝑓 𝑎, 𝑏, 𝑐, 𝑑 = ෍ 𝑚 0,1,3,5,6,7,11,12,14

𝑓 𝑎, 𝑏, 𝑐, 𝑑 = ෑ 𝑀 5,7,13,14,15 ∙ ෑ 𝐷 1,2,3,9

𝑓 𝑎, 𝑏, 𝑐, 𝑑, 𝑒 = ෍ 𝑚 (0,3,4,5,6,7,8,12,13,14,16,21,23,24,29,31)
Internal Use

Examples
Find the minimum sum-of-products expression for each function. Determine which
minterm/s makes the corresponding prime implicant essential.

𝑓 𝑎, 𝑏, 𝑐, 𝑑 = ෍ 𝑚 4,11,12,13,14 + ෍ 𝑑 (5,6,7,8,9,10)

𝑓 𝑎, 𝑏, 𝑐, 𝑑 = ෍ 𝑚 3,11,12,13,14 + ෍ 𝑑 (5,6,7,8,9,10)

Find the minimum sum-of-products expression and product-of-sums expression for the
function below:

𝑓 𝑎, 𝑏, 𝑐, 𝑑, 𝑒 = ෍ 𝑚 0,1,2,6,7,9,10,15,16,18,20,21,27,30 + ෍ 𝑑 (3,4,11,12,19)
Internal Use

You might also like