Karnaugh Map (K MAP)
A Karnaugh Map (K-Map) is a graphical method used to simplify Boolean expressions in digital logic circuits. It helps reduce complex Boolean expressions into simpler forms by grouping adjacent 1s or 0s in a specific pattern.
In a Karnaugh Map (K-Map), we group adjacent 1s or adjacent 0s, depending on the type of Boolean expression being simplified.
Groups must contain 1, 2, 4, 8, or 16 adjacent cells (powers of 2). |
A Karnaugh Map makes Boolean simplification easier than using the laws of Boolean algebra. It is commonly used in digital electronics to design simple and efficient logic circuits with fewer logic gates.
Types of Karnaugh Maps
Karnaugh Maps are classified according to the number of input variables used in a Boolean function.
- 2-Variable K-Map: Contains 4 cells and is used for Boolean functions with two input variables.
- 3-Variable K-Map: Contains 8 cells and is used for Boolean functions with three input variables.
- 4-Variable K-Map: Contains 16 cells and is used for Boolean functions with four input variables.
- 5-Variable K-Map: Contains 32 cells and is used for Boolean functions with five input variables.
- 6-Variable K-Map: Contains 64 cells and is used for Boolean functions with six input variables.
K-Maps can be designed for more than six variables, such as 7-variable and 8-variable functions. However, they become increasingly complex and difficult to simplify manually. Therefore, K-Maps are most commonly used for 2 to 4 variables, while 5- and 6-variable K-Maps are also used.
| Important: Number of Cells = 2^n, where n represents the number of input variables. |
Karnaugh Map Simplification Rules | Grouping Cells
A Karnaugh Map (K-Map) works based on Boolean algebra and the complement laws:
- X + X’ = 1
- X . X’ = 0
K-Map follows specific rules for grouping adjacent cells to obtain the simplest Boolean expression; let’s explain all basic rules
K-MAP: Rule 1
For Minterms (SOP- Sum of Products): Groups can contain only 1s. Zeros are not allowed in a group.

For Maxterms (POS- Product of Sums): Groups can contain only 0s. Ones are not allowed in a group.

K-MAP: Rule 2
Adjacent Grouping: Groups can be formed horizontally or vertically. Diagonal grouping is not allowed.

K-MAP: Rule 3
Group Size: Each group must contain (1, 2, 4, 8, 16), etc., cells (powers of 2). Groups of 3, 5, 6, or other non-power-of-2 sizes are not allowed.

K-MAP: Rule 4
Cover All 1s: Every 1 in a K-Map must be included in at least one group. No 1 should be left uncovered.
K-MAP: Rule 5
Minimum Number of Groups: Always try to make fewer groups with the largest possible size. Larger groups simplify Boolean expressions and reduce the number of variables.

K-MAP: Rule 6
Overlapping Groups: Overlapping groups are allowed in a K-Map. A cell containing 1 can be included in more than one group if it helps simplify the Boolean expression.

K-MAP: Rule 7
Wrap-Around Grouping: Groups can wrap around the edges of a K-Map. The cells on the opposite edges (left and right, or top and bottom) are considered adjacent and can be grouped together.

2-Variable Karnaugh Map (K-Map)
A 2-variable Karnaugh Map (K-Map) is a graphical method used to simplify Boolean expressions containing two variables, A and B. It consists of 4 cells, representing all possible combinations of the two input variables. K-Map simplification reduces Boolean expressions by grouping adjacent cells.

2-Variable K-Map for Minterms
A 2-variable K-Map for minterms is used to simplify Boolean expressions in Sum of Products (SOP) form. It contains 4 cells representing the four possible combinations of variables A and B. The following diagram shows the structure of a 2-variable K-Map for minterms

2-Variable K-Map for Minterms – Example

- Step 1: Identify the cells containing 1s. The given 1s are at minterms 0, 1, and 2.
- Step 2: Write the Boolean function using minterms: F(A,B) = Σm(0,1,2).
- Step 3: Make the first horizontal group of two adjacent 1s (m0 and m1). In this group, A = 0 remains constant, while B changes. Therefore, the simplified term is A’.
- Step 4: Make the second vertical group of two adjacent 1s (m0 and m2). In this group, B = 0 remains constant, while A changes. Therefore, the simplified term is B’.
- Step 5: Combine both terms using the OR operation.
Final Boolean Expression: F(A, B) = A’ + B’.
2-Variable K-Map for Maxterms
A 2-variable K-Map for maxterms is used to simplify Boolean expressions in Product of Sums (POS) form. It contains 4 cells representing the four possible combinations of variables A and B. The following diagram shows the structure of a 2-variable K-Map for maxterms.

2-Variable K-Map for Maxterms- Example
A 2-variable K-Map for maxterms (POS) uses 0s to represent the given maxterms. Adjacent 0s are grouped to simplify the Boolean expression. The following diagram shows an example of a 2-variable K-Map for maxterms.

Boolean function for the above diagram is
- Step 1: Identify the cells containing 0s. The given 0s are at maxterms 0, 1, and 2.
- Step 2: Write the Boolean function using maxterms: F(A,B) = ΠM(0,1,2).
- Step 3: Make the first horizontal group of two adjacent 0s (M0 and M1). In this group, A = 0 remains constant, while B changes. Therefore, the simplified term is A.
- Step 4: Make the second vertical group of two adjacent 0s (M0 and M2). In this group, B = 0 remains constant, while A changes. Therefore, the simplified term is B.
- Step 5: Combine both terms using the AND operation.
Final Boolean Expression: F(A, B) = A · B.
2-Variable Karnaugh Map (K-Map) Variables in Result
In a 2-variable K-Map, always make the largest possible groups of adjacent 1s first. Larger groups reduce the number of variables in the simplified Boolean expression.

-
4 Cells = 1: If all 4 cells contain 1, make one group of 4. Both variables are eliminated, and the simplified answer is F = 1.
-
2 Cells = 1: If 2 adjacent cells contain 1, make a group of 2. Only one variable remains in the simplified expression. For example, F = A.
-
1 Cell = 1: If only one cell contains 1, make a group of 1. Both variables remain in the simplified expression. For example, F = AB.
Important: Always make the largest possible groups first: 4, 2, and then 1. Larger groups produce simpler Boolean expressions.
3-Variable Karnaugh Map (K-Map)
A 3-variable Karnaugh Map (K-Map) is a graphical method used to simplify Boolean expressions containing three variables, A, B, and C. It consists of 8 cells, representing all possible combinations of the three input variables. K-Map simplification reduces Boolean expressions by grouping adjacent cells.

3-Variable K-Map for Minterms
A 3-variable K-Map for minterms simplifies Boolean expressions in Sum of Products (SOP) form. It contains 8 cells representing all possible combinations of variables A, B, and C. The following diagram shows the structure of a 3-variable K-Map for minterms.

Example: A 3-variable K-Map for minterms (SOP) uses 1s to represent the given minterms. Adjacent 1s are grouped to simplify the Boolean expression. The following diagram shows an example of a 3-variable K-Map for minterms.

Boolean expression: The Boolean expression in the above diagram is given below
- Step 1: Identify the cells containing 1s. The given 1s are at minterms 1, 5, and 6.
- Step 2: Write the Boolean function using minterms: F(A,B,C) = Σm(1,5,6).
- Step 3: Make the first vertical group of two adjacent 1s (m1 and m5). In this group, B = 0 and C = 1 remain constant, while A changes. Therefore, the simplified term is B’C.
- Step 4: The remaining 1 at minterm 6 cannot be grouped with another adjacent 1. Therefore, keep it as a single term. Its binary combination is 110, which gives ABC’.
- Step 5: Combine both terms using the OR operation.
Final Boolean Expression: F(A, B, C) = B’C + ABC’.
3-Variable K-Map for Maxterms
A 3-variable K-Map for maxterms is used to simplify Boolean expressions in Product of Sums (POS) form. It contains 8 cells representing all possible combinations of variables A, B, and C. The following diagram shows the structure of a 3-variable K-Map for maxterms.

Example: A 3-variable K-Map for maxterms (POS) uses 0s to represent the given maxterms. Adjacent 0s are grouped to simplify the Boolean expression. The following diagram shows an example of a 3-variable K-Map for maxterms.

Boolean expression: The Boolean expression in the above diagram is given below
-
Step 1: Identify the cells containing 0s. The given 0s are at maxterms 1, 5, and 6.
-
Step 2: Write the Boolean function using maxterms: F(A, B, C) = ΣM(1,5,6).
-
Step 3: Make the first vertical group of two adjacent 0s (m1 and m5). In this group, B = 0 and C = 1 remain constant, while A changes. Therefore, the simplified term is (B + C’).
-
Step 4: The remaining 0 at maxterm 6 cannot be grouped with another adjacent 0. Therefore, keep it as a single term. Its binary combination is 110, which gives (A’ + B’ + C).
-
Step 5: Combine both terms using the AND operation.
Final Boolean Expression: F(A,B,C) = (B + C’)(A’ + B’ + C).
2-Variable Karnaugh Map (K-Map) Variables in Result
In a 3-variable K-Map, always make the largest possible groups of adjacent 1s first. Larger groups reduce the number of variables in the simplified Boolean expression.

-
8 Cells = 1: If all 8 cells contain 1, make one group of 8. All variables are eliminated, and the simplified answer is F = 1.
-
4 Cells = 1: If 4 adjacent cells contain 1, make a group of 4. Only one variable remains in the simplified expression. For example, F = A.
-
2 Cells = 1: If 2 adjacent cells contain 1, make a group of 2. Two variables remain in the simplified expression. For example, F = AB.
-
1 Cell = 1: If only one cell contains 1, make a group of 1. All three variables remain in the simplified expression. For example, F = ABC.
4-Variable Karnaugh Map (K-Map)
A 4-variable Karnaugh Map (K-Map) is a graphical method used to simplify Boolean expressions containing four variables, A, B, C, and D. It consists of 16 cells, representing all possible combinations of the four input variables. K-Map simplification reduces Boolean expressions by grouping adjacent cells.

4-Variable K-Map for Minterms
A 4-variable K-Map for minterms is used to simplify Boolean expressions in Sum of Products (SOP) form. It contains 16 cells representing all possible combinations of variables A, B, C, and D. The following diagram shows the structure of a 4-variable K-Map for minterms.

A 4-variable K-Map for minterms (SOP) uses 1s to represent the given minterms. Adjacent 1s are grouped to simplify the Boolean expression. The following diagram shows an example of a 4-variable K-Map for minterms.

4-Variable K-Map for Maxterms
A 4-variable K-Map for maxterms is used to simplify Boolean expressions in Product of Sums (POS) form. It contains 16 cells representing all possible combinations of variables A, B, C, and D. The following diagram shows the structure of a 4-variable K-Map for maxterms.

A 4-variable K-Map for maxterms (POS) uses 0s to represent the given maxterms. Adjacent 0s are grouped to simplify the Boolean expression. The following diagram shows an example of a 4-variable K-Map for maxterms.

4-Variable Karnaugh Map (K-Map) Variables in Result
In a 4-variable K-Map, always make the largest possible groups of adjacent 1s first. Larger groups reduce the number of variables in the simplified Boolean expression.

- 16 Cells = 1: If all 16 cells contain 1, make one group of 16. All variables are eliminated, and the simplified answer is F = 1.
- 8 Cells = 1: If 8 adjacent cells contain 1, make a group of 8. Only one variable remains in the simplified expression. For example, F = A.
- 4 Cells = 1: If 4 adjacent cells contain 1, make a group of 4. Two variables remain in the simplified expression. For example, F = AB.
- 2 Cells = 1: If 2 adjacent cells contain 1, make a group of 2. Three variables remain in the simplified expression. For example, F = ABC.
- 1 Cell = 1: If only one cell contains 1, make a group of 1. All four variables remain in the simplified expression. For example, F = ABCD.
Purpose of Karnaugh Map (K-Map)
The main purpose of a Karnaugh Map (K-Map) is to simplify Boolean expressions and reduce the number of logic gates required to design digital circuits. It provides a graphical method for grouping adjacent 1s or 0s to obtain a simpler Boolean expression.
The main purposes of K-Map are given below
- Simplify Boolean Expressions: Reduces complex Boolean expressions into simpler forms.
- Reduce Logic Gates: Minimizes the number of logic gates required in digital circuits.
- Reduce Circuit Cost: Helps design smaller and less expensive digital circuits.
- Improve Circuit Efficiency: Reduces circuit complexity and power consumption.
- Simplify SOP and POS Expressions: Supports simplification using minterms (SOP) and maxterms (POS).
- Identify Redundant Variables: Eliminates variables that are not needed in the simplified expression.
In further lectures, we will see various examples of K-maps using 2, 3, and 4 variables.
Solve F(A,B) = Σm(2,3) Using 2-Variable K-Map
Let’s solve the given example using minterms; the following diagram explains it

Let’s explain the above diagram
- Step 1: Given Boolean function is F(A, B) = Σm(2,3).
- Step 2: Place 1 in minterm cells 2 and 3 because these are the given minterms. Place 0 in the remaining cells.
- Step 3: Group the two adjacent 1s (m2 and m3).
- Step 4: In both cells, A = 1 remains constant, while B changes from 0 to 1. Therefore, eliminate B.
- Step 5: Write the simplified Boolean expression.
