Digital lecture 4
Digital lecture 4
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.
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 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
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
5
Prepared By: Dana Salahalddin Abdullah Digital Circuits 4th Lecture
Ex1: Determine Karnaugh map for the following standard SOP expression:
𝐴̅𝐵̅𝐶𝐷 + 𝐴̅𝐵̅𝐶̅ 𝐷 + 𝐴𝐵𝐶𝐷 + 𝐴𝐵𝐶̅ 𝐷 + 𝐴̅𝐵𝐶̅ 𝐷
̅ + 𝐴𝐵𝐶̅ 𝐷
̅ + 𝐴𝐵̅𝐶𝐷
̅
Solution: According to the SOP expression 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.
8
Prepared By: Dana Salahalddin Abdullah Digital Circuits 4th Lecture
Ex: Use a Karnaugh map to minimize (simplify) the following standard SOP
5-variable expression:
𝑌 = 𝐴̅𝐵̅𝐶̅ 𝐷
̅ 𝐸̅ + 𝐴̅𝐵̅𝐶𝐷
̅ 𝐸̅ + 𝐴̅𝐵𝐶𝐷
̅ 𝐸̅ + 𝐴̅𝐵𝐶̅ 𝐷
̅ 𝐸̅ + 𝐴̅𝐵̅𝐶̅ 𝐷
̅ 𝐸 + 𝐴̅𝐵𝐶𝐷
̅𝐸
+ 𝐴̅𝐵𝐶𝐷𝐸 + 𝐴𝐵̅𝐶̅ 𝐷̅ 𝐸̅ + 𝐴𝐵̅𝐶̅ 𝐷
̅ 𝐸 + 𝐴𝐵̅𝐶𝐷𝐸 + 𝐴𝐵𝐶𝐷 ̅𝐸
+ 𝐴𝐵𝐶𝐷𝐸
9
Prepared By: Dana Salahalddin Abdullah Digital Circuits 4th Lecture
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
Solution: The Karnaugh map for the POS expression is as shown next
12