In digital circuits and various practical applications, it’s often necessary to simplify expressions to use the fewest possible variables. Using K-maps, Boolean expressions with 3 or 4 variables can be minimized easily without relying on Boolean algebra theorems.
K -Maps are also called Karnaugh Maps, which involves mapping of the outputs in a grid form where each cell will define the combination of the inputs.
K-Maps can take two forms
- Sum of Product ( SOP )
- Product of Sum (POS)
Procedure to Solve a K- Map
- Choose the appropriate K-map based on the number of variables.
- Identify the minterms or maxterms specified in the problem.
- For SOP, place 1’s in the K-map cells corresponding to the minterms (leave 0’s in the other cells).
- For POS, place 0’s in the K-map cells corresponding to the maxterms (leave 1’s in the other cells).
- Create rectangular groups containing a number of cells that is a power of two (e.g., 2, 4, 8) and aim to cover as many cells as possible within each group.
- Derive the product terms from the groups identified in step 5, then sum them up to obtain the SOP form.
K -Maps in SOP form
2 Variable K -Map
In this two Variable K Map we try to map the output Y in the K -Map where each cell is a result of different product terms. The ‘1’ which is circled is grouped alone as it doesn’t have any 1s adjacent to it. And so is the other ‘1’ which is the output when A = 1 and B = 0. Hence we can write the expression for the output Y as A’B + AB’.
3 Variable K -Map
In a 3-variable K-map, we map the output Y across 8 cells, each representing a unique combination of the three variables (A, B, C). The grouping of 1s follows the same principle of adjacency, where we look for groups of 1s that can be combined to simplify the expression. Groups can contain 1, 2, 4, or 8 cells, representing different combinations. For example, if we have 1s in cells representing A’BC’ and AB’C’, they can be grouped, and the simplified expression would be BC’. The goal is to minimize the logic expression by combining adjacent cells wherever possible.
4 Variable K map
A 4-variable Karnaugh map (K-map) simplifies Boolean expressions with four input variables (A, B, C, D). It is arranged as a 4×4 grid, where each cell represents a minterm (product term) in Sum of Products (SOP) form, corresponding to a combination of input variables. The rows and columns of the grid are labeled using Gray code, ensuring that adjacent cells differ by only one variable. To simplify a Boolean function, group the 1’s in the K-map into the largest possible power-of-2 blocks (1, 2, 4, 8, etc.), then derive the simplified SOP expression based on the common variables in each group.
K -Maps in POS
In POS, the function is represented as a product (AND) of sum terms (OR of literals). For K-maps, ‘0’s are placed in the cells corresponding to the maxterms. Groups of adjacent ‘0’s are formed into blocks, and the common variables are used to derive a simplified POS expression by combining the sum terms.
2 Variable K -Map
(POS of Y) = (SOP of Y’)’
A 2-variable K-map in Product of Sums (POS) simplifies Boolean functions by focusing on grouping the 0’s, which represent maxterms. The K-map has four cells, corresponding to all possible combinations of the two variables (A and B).Place a ‘0’ in the cells that correspond to the input combinations where the output is 0 (representing maxterms).Group adjacent 0’s in the K-map into the largest possible power-of-2 blocks (1, 2, or 4 cells).Write the final POS expression as the product of these sum terms (ORed terms inside parentheses).
3 Variable K -Map
The K-map has been plotted, and ‘0’s are marked to represent the conditions where the output is 0. These 0’s are grouped to simplify the expression. The first two 0’s form a group where A=0A = 0A=0 and B=0B = 0B=0 or C=0C = 0C=0. This results in the sum term (A+C)(A + C)(A+C).The first two 0’s form a group where A=0A = 0A=0 and B=0B = 0B=0 or C=0C = 0C=0. This results in the sum term (A+C)(A + C)(A+C).The POS expression is formed by multiplying these sum terms : Y=(A+C)(B+C′)
First group (top-left corner, covering two 0’s): This corresponds to (A+C+D)(A + C + D)(A+C+D).
Second group (top-middle, covering the single 0 in the first row): This gives (A+B′+D)(A + B’ + D)(A+B′+D).
Third group (middle-left, covering the two 0’s in the second column): This gives (A+B′+C′+D)(A + B’ + C’ + D)(A+B′+C′+D).
Fourth group (middle-right, covering a single 0): This gives (A+B+C′+D′)(A + B + C’ + D’)(A+B+C′+D′).
Fifth group (bottom-left, covering a single 0): This gives (A′+B′+C′+D′)(A’ + B’ + C’ + D’)(A′+B′+C′+D′).
The final POS expression for the K-Map is Y=(A+C+D)(A+B′+D)(A+B′+C′+D)(A+B+C′+D′)(A′+B′+C′+D′)
Important Note (POS of Y) = (SOP of Y’)’