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

Digital lecture 4

Uploaded by

a7madsala7ussain
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)
4 views

Digital lecture 4

Uploaded by

a7madsala7ussain
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/ 12

Prepared By: Dana Salahalddin Abdullah Digital Circuits 4th Lecture

KARNAUGH MAP:
A Karnaugh map provides a systematic method for simplifying
Boolean expressions and, if properly used, it will produce the
simplest SOP or POS expression possible, known as the minimum
expression. As it seen before, the effectiveness of algebraic
simplification depends on familiarity with all the laws, rules, and
theorems of Boolean algebra. Karnaugh map, on the other hand,
provides fast and immediate method for simplification.
The Karnaugh map is an array of cells in which each cell
represents a binary value of the input variables.
The number of cells in a Karnaugh map is equal to the total
number of possible input variable. For three input variables, the
number of cells is 23 = 8. For four variables, the number of cells is
24 = 16, and so on.

Karnaugh Map Simplification of SOP Expressions


Grouping the ones (1s), you can group 1s on the Karnaugh map
according to the following rules by enclosing those adjacent cells containing
1s. The goal is to maximize the size of the groups and to minimize the
number of groups.
• A group must contain 1, 2, 4, 8, or 16 cells, which are all powers of two.
• Each cell in a group must be adjacent to one or more cells in that same
group.
• Always include the largest possible number of 1s in a group in
accordance with rule 1.

1
Prepared By: Dana Salahalddin Abdullah Digital Circuits 4th Lecture

• 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.

The 2-Variable Karnaugh Map:


The 2-variable Karnaugh map is an array of four cells, for example, if we
have the following truth table:
A B F
0 0 0
0 1 1
1 0 1
1 1 1

The Karnaugh map for the above truth table will be:

When A and B=0 the value of F is 0, but for the other values of A and B
(when A=1and B=0, A=0 and B=1, A=1 and B=1), the value of F will be
equal to 1.
Ex1: Simplify the following function 𝑓 = 𝐴𝐵̅ + 𝐴𝐵, by using Karnaugh
map method.
Solution: Karnaugh map for the function is as below:

2
Prepared By: Dana Salahalddin Abdullah Digital Circuits 4th Lecture

Referring to the map above, the two adjacent 1 are grouped together. This
eliminates variable B leaving only variable A which only has its true form.
The minimized answer therefore is f = A.
Ex2: Simplify the following function 𝑍 = 𝐴̅𝐵̅ + 𝐴𝐵̅ + 𝐴̅𝐵, by using
Karnaugh map method.
Solution: Karnaugh map for the function is as below:

Pairs of 1's are grouped, and the simplified answer is obtained by using the
following steps: Note that two groups can be formed for the example given
above. Notice that a 1 can belong to more than one group. The first group,
consists of two 1s which correspond to A = 0, B = 0 and A = 1, B = 0. It’s
clear that all cell in this example that correspond to the area of the map
where B = 0 contains 1s, independent of the value of A. So when B = 0 the
output is 1. The expression of the output will contain the term 𝐵̅ .
For the second group, corresponds to the area of the map where A = 0.
The group can therefore be defined as 𝐴̅. This implies that when A = 0 the
output is 1. The output is therefore 1 whenever B = 0 and A = 0 Hence the
simplified answer is 𝑍 = 𝐴̅ + 𝐵̅.

3
Prepared By: Dana Salahalddin Abdullah Digital Circuits 4th Lecture

The 3-Variable Karnaugh Map:


The 3-variable Karnaugh map is an array of eight cells. In this case, A, B
and C are used for the variables (or any other letters). The value of a given
cell is the binary values of A and B at the left in the same row combined
with the value of C at the top in the same column. For example, the cell in
the upper left corner has a binary value of 000 and the cell in the lower right
corner has a binary value of 101.
Figure below show Karnaugh map for 3 variable (SOP).

Ex1: Determine Karnaugh map for the following standard SOP expression:
𝐴𝐵𝐶 + 𝐴𝐵𝐶̅ + 𝐴̅𝐵𝐶̅ + 𝐴̅𝐵̅𝐶
Solution: According to the SOP expression the Karnaugh map will be as
follows:

Ex2: Write (SOP) function for the following truth table. Then, simplify
function by using Karnaugh map method.

4
Prepared By: Dana Salahalddin Abdullah Digital Circuits 4th Lecture

Solution: The sum of product (POS) function is:


𝑌 = 𝐴𝐵𝐶 + 𝐴𝐵̅𝐶 + 𝐴̅𝐵𝐶 + 𝐴̅𝐵𝐶̅ + 𝐴̅𝐵̅𝐶
Now, this function (Boolean expression) can be simplified by using
Karnaugh map.

So, the simplified function according to the karnaugh map simplification


rule for the (SOP) is: 𝑌 = 𝐶 + 𝐴̅𝐵.
The 4-Variable Karnaugh Map:
The 4-variable Karnaugh map is an array of sixteen cell. Binary values of A
and B are along the left side and the values of C and D are across the top
(other letters could be used). The value of a given cell is the binary values of
A and B at the left in the same row combined with the binary values of C
and D at the top in the same column. For example, the cell in the upper right
corner has a binary value of 0010 and the cell in the lower right corner has a
binary value of 1010.

5
Prepared By: Dana Salahalddin Abdullah Digital Circuits 4th Lecture

Figure at next page shows Karnaugh map for 4 variables.

Ex1: Determine Karnaugh map for the following standard SOP expression:
𝐴̅𝐵̅𝐶𝐷 + 𝐴̅𝐵̅𝐶̅ 𝐷 + 𝐴𝐵𝐶𝐷 + 𝐴𝐵𝐶̅ 𝐷 + 𝐴̅𝐵𝐶̅ 𝐷
̅ + 𝐴𝐵𝐶̅ 𝐷
̅ + 𝐴𝐵̅𝐶𝐷
̅
Solution: According to the SOP expression the Karnaugh map will be as
follows:

Ex2: For the following Boolean expression function. Determine the


simplified function by using Karnaugh map.
𝐹 = 𝐴̅𝐵̅𝐶̅ 𝐷
̅ + 𝐴̅𝐵𝐶̅ 𝐷
̅ + 𝐴̅𝐵̅𝐶𝐷
̅ + 𝐴̅𝐵𝐶𝐷
̅ + 𝐴𝐵𝐶𝐷
Solution: The simplified function according to the Karnaugh map will be as
follows:

6
Prepared By: Dana Salahalddin Abdullah Digital Circuits 4th Lecture

𝐹 = 𝐴̅𝐷
̅ + 𝐴𝐵𝐶𝐷
Homework: For the following Karnaugh map. Determine the simplified
expression function: (choosing any letters for four variables)
1 1 0 1
0 0 0 0
0 0 0 0
1 0 0 1

Ex3: Write (SOP) function for the following 4 input variables truth table.
Then, simplify function by using Karnaugh map method.

7
Prepared By: Dana Salahalddin Abdullah Digital Circuits 4th Lecture

Solution: The sum of product (POS) function for the above 4 variable inputs is:
𝑌 = 𝐴̅𝐵̅𝐶̅ 𝐷 + 𝐴̅𝐵̅𝐶𝐷 + 𝐴̅𝐵𝐶̅ 𝐷 + 𝐴̅𝐵𝐶𝐷
̅ + 𝐴̅𝐵𝐶𝐷 + 𝐴𝐵̅𝐶̅ 𝐷 + 𝐴𝐵̅𝐶𝐷 +
𝐴𝐵𝐶̅ 𝐷 + 𝐴𝐵𝐶𝐷
Now, this function (Boolean expression) can be simplified by using
Karnaugh map.

So, the simplified function according to the karnaugh map simplification


rule for the (SOP) is: 𝑌 = 𝐴̅𝐵𝐶 + 𝐷.

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. It explained before, the cell
adjacencies within each of the 4- variable maps and how to form
groups of cells containing 1s, to simplify an SOP expression. What
need to learn for five variables is: the cell adjacencies between the
two 4-variable maps and how to group those adjacent 1s.
The best way to visualize cell adjacencies between the two 16-cel1
maps is to imagine that the A = 0 map is placed on top of the A = 1
map.

8
Prepared By: Dana Salahalddin Abdullah Digital Circuits 4th Lecture

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


in the A =1 map. The figure in next page shows the karnaugh map
for the five input variables and the way for simplification.

The simplified function expression is: 𝐹 = 𝐷𝐸̅ + 𝐵̅𝐶𝐸 + 𝐴̅𝐵𝐷


̅ + 𝐵𝐶̅ 𝐷
̅𝐸

Ex: Use a Karnaugh map to minimize (simplify) the following standard SOP
5-variable expression:

𝑌 = 𝐴̅𝐵̅𝐶̅ 𝐷
̅ 𝐸̅ + 𝐴̅𝐵̅𝐶𝐷
̅ 𝐸̅ + 𝐴̅𝐵𝐶𝐷
̅ 𝐸̅ + 𝐴̅𝐵𝐶̅ 𝐷
̅ 𝐸̅ + 𝐴̅𝐵̅𝐶̅ 𝐷
̅ 𝐸 + 𝐴̅𝐵𝐶𝐷
̅𝐸
+ 𝐴̅𝐵𝐶𝐷𝐸 + 𝐴𝐵̅𝐶̅ 𝐷̅ 𝐸̅ + 𝐴𝐵̅𝐶̅ 𝐷
̅ 𝐸 + 𝐴𝐵̅𝐶𝐷𝐸 + 𝐴𝐵𝐶𝐷 ̅𝐸
+ 𝐴𝐵𝐶𝐷𝐸

Solution: The Karnaugh map and the simplified expression according to 1s


groups will be as below:

9
Prepared By: Dana Salahalddin Abdullah Digital Circuits 4th Lecture

Then the simplified (SOP) function is: 𝑌 = 𝐴̅𝐷


̅ 𝐸̅ + 𝐵̅𝐶̅ 𝐷
̅ + 𝐵𝐶𝐸 + 𝐴𝐶𝐷𝐸

Don't Care Conditions:


Sometimes a situation arises in which some input variable
combinations are not allowed. For example, recall that in the BCD
code there are six invalid combinations: 1010, 1011, 1100, 1101,
1110, and 1111. Since these not allowed states will 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. That is, for
these "don't care" terms, it really does not matter since they will
never occur.
The "don't care" terms can be used to advantage on the Karnaugh
map, by writing X instead of 1 or 0.
When grouping the 1s, the Xs can be treated as 1s to make a larger
grouping, when it adjacent to 1s.
Ex: the following truth table describes a logic function that has a 1
output only when the BCD code for 7,8, or 9 is present on the inputs.
Conclude the advantage of using “Don’t care” condition for simplify
Boolean expression.

10
Prepared By: Dana Salahalddin Abdullah Digital Circuits 4th Lecture

Solution: The Karnaugh map for the above truth table will be as next:

If the "don't cares" are used as 1s, the resulting expression for the function
is: A + BCD.
But if the "don't cares" are not used as 1s, the resulting expression is:
𝐴𝐵̅𝐶̅ + 𝐴̅𝐵𝐶𝐷.
So, it can be seen the advantage of using "don't care" terms to get the
simplest expression.

11
Prepared By: Dana Salahalddin Abdullah Digital Circuits 4th Lecture

Karnaugh Map Simplification of POS Expressions


The process for minimizing a POS expression is basically the
same as for an SOP expression except that it will group 0s to
produce minimum sum terms instead of grouping 1s to produce
minimum product terms. The rules for grouping the 0s are the same
as those for grouping the 1s that explained before.

Ex: Use a Karnaugh map to minimize the following standard POS


expression. Also, derive the equivalent SOP expression.
(𝐴 + 𝐵 + 𝐶)(𝐴 + 𝐵̅ + 𝐶)(𝐴̅ + 𝐵̅ + 𝐶)(𝐴 + 𝐵 + 𝐶̅ )(𝐴 + 𝐵̅ + 𝐶̅ )

Solution: The Karnaugh map for the POS expression is as shown next

According to the Karnaugh map, simplified POS expression is:


𝐴. (𝐵̅ + 𝐶)
Also, from Karnaugh map the simplified SOP expression is:
𝐴𝐵̅ + 𝐴𝐶
We can conclude the truth of our solution because, 𝐴. (𝐵̅ + 𝐶)= 𝐴𝐵̅ + 𝐴𝐶

12

You might also like