- The K-Map is used to simplify the Boolean Functions in a very easy way.
- The K-Map was introduced by Karnaugh.
- Hence this method was named K-Map.
- This is a graphical method consisting of 2
^{n}cells for n variables. - The adjacent cells vary only in 1 bit position.

K-Maps for 2 to 5 Variables

For reducing the smaller number of variables we can use Boolean identities. But as the number of variables increases it becomes very difficult to simplify. Now we will understand how to reduce 2 variables to 5 variables using K-map.

## 2 Variable K-Map

As we have two variables the number of cells will become 2^{2} cells. Hence, 4 cells will be there for two variable K-map.

- From the above figure we can see that there are only four combinations possible for two variables.
- These combinations can be {(m
_{0}, m_{1}), (m_{2}, m_{3}), (m_{0}, m_{2}) and (m_{1}, m_{3})}.

## 3 Variable K-Map

As we have three variables the number of cells will become 2^{3} cells. Hence, 8 cells will be there for three variable K-map.

From the above figure we can see that there are only eight combinations possible for three variables.

- The possible are {(m
_{0}, m_{1}, m_{3}, m_{2}), (m_{4}, m_{5}, m_{7}, m_{6}), (m_{0}, m_{1}, m_{4}, m_{5}), (m_{1}, m_{3}, m_{5}, m_{7}), (m_{3}, m_{2}, m_{7}, m_{6}) and (m_{2}, m_{0}, m_{6}, m_{4})}. - If we group two adjacent min terms then the possible combinations are {(m
_{0}, m_{1}), (m_{1}, m_{3}), (m_{3}, m_{2}), (m_{2}, m_{0}), (m_{4}, m_{5}), (m_{5}, m_{7}), (m_{7}, m_{6}), (m_{6}, m_{4}), (m_{0}, m_{4}), (m_{1}, m_{5}), (m_{3}, m_{7}) and (m_{2}, m_{6})}. - For x=0, only three variables are there. Hence, now the K-map is reduced from a 3 variable to 2 variables.

## 4 Variable K-Map

As we have four variables the number of cells will become 2^{4} cells. Hence, 16 cells will be there for four variable K-map.

From the above figure we can see that there are 16 combinations possible for four variables. These combinations can be

- If we suppose that RW
_{1}, RW_{2}, RW_{3}and RW_{4}represent the min-terms of the first row, second row, third row and fourth row respectively. - Similarly, C
_{1}, C_{2}, C_{3}and C_{4 }represent the min-terms of the first column, second column, third column and fourth column respectively. - Then the possible combinations are {(RW
_{1}, RW_{2}), (RW_{2}, RW_{3}), (RW_{3}, RW_{4}), (RW_{4}, RW_{1}), (C_{1}, C_{2}), (C_{2}, C_{3}), (C_{3}, C_{4}), (C_{4}, C_{1})}. - When the value of w=0, then the 4 variable K-map becomes three variable K-map.

## Rules for simplifying K-maps:

- First of all we need to select K-map depending upon the number of variables.
- When the Boolean function has all Max terms then we place 0 at the respective Max term cell.
- When the Boolean function is in PoS form then we place 0 at the respective Max term cell so that the given sum is valid.
- The grouping can be done by checking the adjacent 0.
- The number of possibilities are 2
^{n} - The value of n tells the number of variables of the Boolean Function.
- There is either one sum term or literal from each group present.
- They are called prime implicants.
- The essential prime implicant is formed when at least one of the 0 is not covered by any other group.
- At last after simplification the Boolean expression will contain all essential prime implicants with only required prime implicants.

**Interested in learning about similar topics? Here are a few hand-picked blogs for you!**

- What is ZigBee?
- Encoders and Decoders
- Working of UART
- Classification of FFT
- Fourier Transform and its properties