Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
41 views31 pages

Lecture 4 - K-Map

The document provides an overview of Karnaugh Maps (K-Maps) as a graphical method for simplifying Boolean functions, detailing their structure for 2, 3, and 4 input variables. It explains the process of filling in K-Maps from truth tables, grouping ones for simplification, and handling don't care conditions. Additionally, it includes examples demonstrating the application of K-Maps to derive simplified Boolean expressions from given truth tables and expressions.

Uploaded by

dina mala
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views31 pages

Lecture 4 - K-Map

The document provides an overview of Karnaugh Maps (K-Maps) as a graphical method for simplifying Boolean functions, detailing their structure for 2, 3, and 4 input variables. It explains the process of filling in K-Maps from truth tables, grouping ones for simplification, and handling don't care conditions. Additionally, it includes examples demonstrating the application of K-Maps to derive simplified Boolean expressions from given truth tables and expressions.

Uploaded by

dina mala
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 31

LECTURE 4

Karnaugh Map
Introduction
• An alternate approach to represent a simplified
Boolean function.
• Similar to a truth table.
• Can be used to minimize Boolean functions
graphically.
• Each cell’s position is fixed by a binary value of
the input variables.
• Number of cells = 2n where n is the number of
input variables.
2-variable K-Map
• For a 2 inputs system, 22 = 4 cells

2 inputs truth table 2-variable K-Map

A B Q B
A 0 1
0 0
0 1 0 00 01

1 0
10 11
1 1 1
2-variable K-Map
• The way you label it will make a difference when doing the Boolean expression simplification.
3-variable K-Map
• For a 3 inputs system, 23 = 8 cells

3 inputs truth table 3-variable K-Map


BC Grey code form
A B C Q A 00 01 11 10
0 0 0 0
OR
0 0 1 1
0 1 0 C A
AB 0 1 BC 0 1
0 1 1
00 00
1 0 0
01 01
1 0 1 OR
1 1 0 11 11

1 1 1 10 10
3-variable K-Map
YZ
X 00 01 11 10

XY
Z
4-variable K-Map
• For a 4 inputs system, 24 = 16 cells
A B C D Q
0 0 0 0 4-variable K-Map
0 0 0 1 Grey code form
0 0 1 0
CD
4 inputs truth table

0 0 1 1
AB 00 01 11 10
0 1 0 0
0 1 0 1 00
0 1 1 0
0 1 1 1
1 0 0 0
01
1 0 0 1
1 0 1 0 11
1 0 1 1
1 1 0 0 10
1 1 0 1
Grey code form
1 1 1 0
1 1 1 1
4-variable K-Map

YZ
WX
Explanation
• Please remember that the adjacent cells
are changed only by one digit / bit.
• Why?
• Easier for us to simplify the expression of
the outputs.
Filling in the K-Map
• From any Boolean expression or a problem
statement, write the truth table first.
• Determine how many inputs and outputs, and
therefore how many K-maps and cells
required.
• Draw the K-map and label it accordingly.
• Do the mapping on the K-map according to the
inputs and outputs condition in the truth table.
Grouping in K-Map
• Group all 1s in the map into group of 2n
where n = 1,2,3,..
• The grouping of the 1s must be in adjacent
cell and can be overlap.
• Every square containing 1 must be
considered at least once.
• A square containing 1 can be included in
as many groups as desired.
• A group must be as large as possible
Grouping in K-Map
 
Examples – (given truth table)
• Example 1: Given the truth table below. Find the simplified
expression using K-map.

Step 1: Fill in the K-map with the respective output values.

B
A B Q
A 0 1
0 0 1
0 1 1 0
1 1
1 0 0
1 1 0 1
0 0
Examples – (given truth table)
Step 2: Group the 1s together.
Step 3: Derive the
Boolean
expression
B
B
A 0 1 Q A
0 1 1
Know why is this so?
0 0 A Since 1s is located at the
1 area outside A.
Examples – (given truth table)
• Example 2: Given the truth table below. Find the simplified expression
using K-map.

Step 1: Fill in the K-map with the


A B C Q respective output values.
0 0 0 1
0 0 1 0 BC
0 1 0 0 A 00 01 11 10
0 1 1 0 1 0 0 0
0
1 0 0 1
1 0 1 0 1 1 0 1 1
1 1 0 1
1 1 1 1
Examples – (given truth table)

Step 2: Group the 1s together. Step 3: Derive the


Boolean
expression
C
BC
A 00 01 11 10

1 0 0 0
0
Q  AB  BC
A 1 1 0 1 1

B
Examples – (given truth table)
• Example 3: Given the truth table below. Find the simplified expression
using K-map.
A B C D Q
0 0 0 0 0 Step 1: Fill in the K-map with the
0 0 0 1 1 respective output values.
0 0 1 0 0
0 0 1 1 0 CD
0 1 0 0 0 AB 00 01 11 10
0 1 0 1 1
0 1 1 0 0 00 0 1 0 0
0 1 1 1 0
1 0 0 0 0 0 1 0 0
01
1 0 0 1 0
1 0 1 0 0
0 1 1 0
1 0 1 1 0 11
1 1 0 0 0
0 0 0 0
1 1 0 1 1 10
1 1 1 0 0
1 1 1 1 1
Examples – (given truth table)

Step 2: Group the 1s together. Step 3: Derive the


Boolean
C expression
CD
AB 00 01 11 10

00 0 1 0 0

0 1 0 0 Q  AC D  ABD
01
B
0 1 1 0
11
A
0 0 0 0
10

D
Examples – (given expression)
• Example 4: Given the Boolean expression below. Find the simplified
expression using K-map.

Q  A B C D  A B C D  A B C D  A B C D  A B C D  A B C D
CD
AB 00 01 11 10

00 0 1 1 0

0 1 1 0
01
0 0 0 0
11
1 1 0 0
10

Step 1: Fill in the K-map with 1 according to the expression.


Examples – (given expression)
Step 2: Group the 1s together.
Step 3: Derive the
C
Boolean
expression
CD
AB 00 01 11 10

00 0 1 1 0

01
0 1 1 0
B
Q  AD  A BC
0 0 0 0
11
A
1 1 0 0
10

D
Examples – (given expression)
• Example 5: Given the Boolean expression below. Find the simplified
expression using K-map.

Q  A  A B  ABC

Step 1:
In this example it is a bit different
since each expression does not
contain all input values. We need
Q  A  A B  ABC
to elaborate each expression.
000 101 110
001 100
We know here that maximum number of inputs
are 3 (A, B, C), meaning there are 8 condition. 010
011
You can always put the condition in the truth
table.
Inputs condition that
satisfy the output
(Q = 1)
Examples – (given expression)
Step 2: Fill in the K-map with 1 where applicable
Step 3: Derive the
Boolean
expression
B
BC
A 00 01 11 10

0 1 1 1 1 Q A  B  C
A 1 1 1 0 1

C
Examples – (given circuit)
• Example 6: Given the circuit
below. Find the simplified
circuit using K-map.

Step 1:
Find the expression at the output of the circuit.

Q  A  A B  A B C
Examples – (given circuit)
• From the expression, derive the
truth table.

A B C Q
Q  A  A B  A B C 0 0 0 0
100 110 001 0 0 1 1
111 011 0 1 0 0
101
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
Examples – (given circuit)
A B C Q Step 2: Fill in the K-map with the respective
output values.
0 0 0 0 B
0 0 1 1 BC
A 00 01 11 10
0 1 0 0
0 0 1 1 0
0 1 1 1
1 0 0 1 A 1 1 1 1 1
1 0 1 1
1 1 0 1 C
1 1 1 1 Step 3: Derive the Boolean expression

Q A  C
Examples – (given circuit)
• Therefore, simplified circuit is:

• Hem?... So where does B go?


Don’t Care Conditions
• Don’t care conditions are those that have input
conditions for which there are no specified
output levels.
• In other words, there are certain input conditions
that may occur that we don’t care whether the
output is high or low.
• In the K Map, we place an ‘X’ wherever output is
a Don’t Care condition.
• The ‘X’ is used as either a 1 or a 0 in the K map
simplification process to our advantage.
Don’t Care Conditions
Example 7: Given the truth table with don’t care condition, find the
simplified expression using K-map.

C C
A B C Q 0 1 0 1
AB AB
0 0 0 0
00 0 0 00 0 0
0 0 1 0
0 1 0 0 0 X 0 0
01 01
0 1 1 X B
1 0 0 X 11 1 1 11 1 1
1 0 1 1 A
10 X 1 10 1 1
1 1 0 1
1 1 1 1
Q A
Don’t Care Conditions
Example 8: We are dealing with an elevator in a three floor building. An indicator is placed at the elevator and is active (ON) when the elevator stops
and one of the floor is aligned with the indicator. The indicator will be OFF when it is aligned at one of the floor while it is still moving.

Derive the digital controller expression to control the indicator.

First: simplify the problems and set what are the inputs and output.

Inputs: F1, F2, F3 (floor) and M (moving)


Output: O (indicator)

O = 1 when M = 0, one of the F = 1


O = 0 when M = 1, one of the F = 1

Indicator can not be at two or three floors at the same time  don’t care condition!
Don’t Care Conditions
Second: Derive the truth table Third: Map into the K-map
M F1 F2 F3 O
0 0 0 0 0
F2
0 0 0 1 1 F2 F3
0 0 1 0 1
M F1 00 01 11 10
0 0 1 1 X
0 1 0 0 1
00 0 1 X 1
0 1 0 1 X
0 1 1 0 X 1 X X X
01
0 1 1 1 X F1
1 0 0 0 0
0 X X X
1 0 0 1 0 11
1 0 1 0 0 M
0 0 X 0
1 0 1 1 X 10
1 1 0 0 0
1 1 0 1 X
1 1 1 0 X
F3
1 1 1 1 x
Don’t Care Conditions
Forth: Group the 1’s Fifth: Derive the Boolean expression

F2
F2 F3
M F1 00 01 11 10 O  M F1  M F 2  M F 3
00 0 1 X 1

01
1 X X X O  M ( F1  F 2  F 3 )
F1
0 X X X
11
M
0 0 X 0
10

F3

You might also like