Karnaugh map for simplification of Boolean expression

Karnaugh map is a very useful tool for simplification of Boolean expression in digital electronics. The other name of Karnaugh map is K-map or K map. It can represent the Boolean equation both in sum of products (SOP) form and product of sum (POS) form. There are two ways to simplify Boolean expressions. One is by using the laws of Boolean algebra and de Morgan theorems and another is by using K maps. In this article, we are going to learn how to simplify Boolean expressions by using Karnaugh map with 2 variables, 3 variables, 4 variables and 5 variables respectively.

Contents in this article:

  1. What is Karnaugh map (K map)?
  2. Uses of K-maps
  3. Simplification of Boolean expression using Karnaugh map with 2 variables
  4. Karnaugh map with 3 variables
  5. Karnaugh map with 4 variables

What is Karnaugh map (k-map)?

Karnaugh map or K-map is a pictorial method to simplify Boolean functions or expressions in digital electronics without using the Boolean algebra. In 1953, American physicist Maurice Karnaugh introduced this method. This is the easiest way to reduce any logic function to a simple form.

How to simplify Karnaugh map?

All the Boolean equations with two or more variables can be easily simplified by using K-maps. Here, the grouping method or the mapping method is used with the binary 1’s in the truth table of the Boolean expression. For better understanding, see the rules at below.

Rules for k map

Now, what are the rules for simplification of K-map? The rules are as followings –

  1. First draw the truth table cells corresponding to the given Boolean expression. You have to notice the number of variables. The number of cells in the truth table depends on the number of variables. If n be the number of variables then the number of cells will be 2n. But remember, the number of rows must be less than or equal to the number of columns. For example: In 2 variables K-map, the number of cells will be 4. There will be 2 rows and 2 columns. In a K-map with 3 variables, the number of rows will be 2 and the number columns will be 4. This is easy to understand in some examples given below.
  2. After drawing the cells, you need to develop the truth table by putting 1‘s in all possible cells according to given Boolean equation. Check the K-maps with 2 variables, 3 variables and 4 variables at below for the better understanding.
  3. Use mapping or grouping with neighbor 1’s. Grouping must be done with 8, 4 or 2 neighbor 1‘s (whichever is greater). If there is only one 1, there will be a group only with this 1.
  4. Take the common variables in row and column of each group of 1’s and write those variables in multiplication form. Now, take the sum of each product of variables from the groups.
  5. This will be the final simplified form of that Boolean expression.

Karnaugh map for 2 variables

Let a Boolean expression with two variables A and B as, \small {\color{Blue} Y= AB + \bar{A}B}. We have simplify this equation by using K map. Here, the number of shells in the truth table will be 4. There will be 2 rows and 2 columns. In the given expression AB and \small \bar{A}B are present. We need to find the correct shell to put 1 for present terms by using (column row) rule. These are the steps for simplification of Boolean algebra by using K-maps.

Step-1: First, we have to draw truth table of K-map for the given equation. The table at below is the truth table for K-map with 2 variables. Here, AB and \small \bar{A}B are present i.e. 1 and rest are absent i.e. 0. Then, using column row, one can determine the position of 1‘s corresponding to the present terms in Boolean expression.

Step-2: In step-2 we have to create groups with one, two, four or eight successive 1‘s. In this case, we get only one group with two 1‘s. The grouping is shown below.

Step-3: Now, write common alphabets for 1’s in each group in column row form. In this case, there is no common alphabets along column for these two 1’s. But along the row, the alphabet, B is common for both 1’s. Then the Boolean expression for this group is B.

Step-4: Add all Boolean expressions for all groups. Here, only one Boolean expression is present due to the only group.

Step-5: This addition of Boolean expression of all groups in the simplified expression. So, the simplified Boolean equation for the expression \small {\color{Blue} Y= AB + \bar{A}B} is \small {\color{Red} Y= B}.

K map for 3 variables

Consider a Boolean expression \small {\color{Blue} Y = ABC + \bar{A}BC + A\bar{B}C + \bar{A}\bar{B}\bar{C}} with three binary variables A, B and C. We have to simplify this equation by using Karnaugh map for 3 variables.

Here, the number cells or squares will be 8 with 2 rows and 4 columns.

Step-1: Write 1 for present terms and 0 for absent or don’t care terms. Here, ABC, \small \bar{A}BC, \small A\bar{B}C , \small \bar{A}\bar{B}\bar{C} are present which are denoted as 1 in the truth table of K-map at below.

Step-2: Three different groups can be formed with these 1‘s as shown below. Two of these groups has two 1‘s and one of these consists of single 1.

Step-3: The Boolean expressions in column row form are \small \bar{A}\bar{B}\bar{C} for the group in violet (because it consists of one 1 and there is no question of common alphabets), BC for the group in green, AC for the group in red after taking common alphabets.

Step-4: After adding all Boolean terms for individual groups we get the simplified form of the given Boolean expression is, \small {\color{Blue} Y = BC + AC + \bar{A}\bar{B}\bar{C}}.

K map for 4 variables

Suppose we have a Boolean expression \small {\color{Blue} Y = ABCD + \bar{A}BCD + A\bar{B}CD +\bar{A}\bar{B}CD} with four variables A, B, C and D. We want to simplify this expression by using K-map. There will be 16 shells with 4 rows and 4 columns in the truth table.

There is only one group with four neighbor 1‘s in the truth table of Karnaugh map with 4 variables. The Boolean expression for this group is CD. This is also the simplified form of the given Boolean expression. Because, there is no other group. So, \small {\color{Blue} Y = CD }.

This is all from this article on the simplification of Boolean expression using Karnaugh map. If you have any doubt on this topic, you can ask me in the comment section.

Thank you!

Related posts:

  1. Boolean algebra for simplification
  2. Basic logic gates
  3. XOR gate
  4. NAND gate
  5. NOR gate

4 thoughts on “Karnaugh map for simplification of Boolean expression”

Leave a Comment