## Karnaugh Map solved examples (three, four and five variables K-Map)

In this tutorial, there are several solved examples of mapping the standard and non-standard POS and SOP expressions to the K-Map. I tried to make this as simple as possible.

## Mapping The Standard POS And SOP To The Karnaugh Map:

#### Example 1: Map the three variable SOP expression:

\(\bar A \bar B \bar C+ A \bar B C + \bar ABC+AB \bar C \)For three variables, the k map has 8 cells (4×2 or 2×4) grid.

No simplification is possible.

#### Example 2: Map the three variable standard SOP expression:

\(\bar A \bar B \bar C+ \bar AB \bar C+AB \bar C \)Another simple SOP expression is given. Directly map it.

The simplified expression is

\(\bar A \bar C+B\bar C \)#### Example 3: Map the POS expression:

\((A+B+C)(\bar A +\bar B + \bar C)(A +\bar B +C) \)In this example, standard POS expression is a given. Map it directly.

The simplified expression is

\((A+C)(\bar A +\bar B + \bar C) \)## Mapping The Non-standard POS And SOP To The Karnaugh Map:

Mapping the non-standard terms needs some extra steps. There are some possibilities to make your work simple. Let’s begin with some examples.

#### Example 4: Map the SOP expression: \(\bar A + A \bar B + AB\bar C \)

\(\bar A + A \bar B + AB\bar C \)##### First method: How to map a non-standard SOP expression into a K-map:

The given expression has three SOP terms, and two of them are non-standard terms. The problem is how to map it. Draw the truth table, and then map the values to K-Map.

A | B | C | \(\bar A + A \bar B + AB\bar C \) |

0 | 0 | 0 | 1 |

0 | 0 | 1 | 1 |

0 | 1 | 0 | 1 |

0 | 1 | 1 | 1 |

1 | 0 | 0 | 1 |

1 | 0 | 1 | 1 |

1 | 1 | 0 | 1 |

1 | 1 | 0 | 0 |

Once we get the truth table, it is easy to map the values on the K-Map.

It is an interesting question. There are 3 groups, two of them are quad (4-cells) and one is a pair (2-cells). All three groups are overlapping. We prefer overlapped groups because they will result in simpler and reduced expressions.

\(\bar A+ \bar B+B \bar C \)#### Example 5: Map the SOP expression:

\(AB + A \bar B C+ ABC\)There is a non-standard term. To map it on a K-map, there should be standard terms. The first method is to draw a truth table and get all the minterms from there as discussed in example 4. The second method is to find out all the terms by analyzing the given expression.

##### Second method: How to map a non-standard SOP expression into a K-map:

The first step is to convert the non-standard SOP expression into a standard SOP. After getting the expression in a standard format, we will be able to map it in Karnaugh Map.

The simplified expression has two groups. These are pairs (2-cells in each group). The simplified SOP expression has two sum-of-product terms. In each term, there are only two variables.

#### Example 6: Draw K-Map for three variable non-standard SOP expression:

\(A + BC \)In standard SOP form.

\(AB \bar C+ A \bar BC+A\bar B \bar C+ ABC+\bar ABC\)After mapping, two groups are formed, a quad (4 cells) and a pair (2-cells). The simplified expression contains only two terms. [ A + BC

#### Example 7: Map the four variable non-standard SOP expression:

\(A\bar B \bar C D +\bar ABC \bar D+B\bar C D+A C \bar D\)In standard SOP form:

\(A\bar B \bar C D + \bar ABC \bar D+AB\bar C D +\\\bar AB \bar CD+ABC \bar D +A \bar B C \bar D\)For four variables, the K-map consists of 16-cells (4×4).

After mapping, there are four groups of 2-cells. We get the simplified SOP expression. It has four terms each with three variables in it. Have a look at simplified expression.

\(B \bar C D+ A \bar C D+BC\bar D+AC \bar D \)#### Example 8: Map four variable non-standard SOP logic expressions.

\(A\bar B + A\bar B \bar C D+ C D+B \bar C D+ABCD\)Transform in the standard SOP form.

\(A\bar B \bar C D + \bar ABC \bar D+AB\bar C D +\\\bar AB \bar CD+ABC \bar D +A \bar B C \bar D\)#### Example 9: Map the four variable standard POS expression in a K map:

\((A+\bar B+C+\bar D)(\bar A+B+\bar C+D)\\(\bar A+\bar B+\bar C+\bar D)\)The standard POS expression is given, map it directly. While mapping the POS expression, write ‘0’ instead of ‘1’. No further simplification is possible.

#### Example 10: Map the four variable non-standard POS expression in a Karnaugh Map:

\((X+\bar Y)(\bar X+\bar Y+\bar Z)( W+\bar Z)\\(W+X+Y+Z)\)The POS expression is in a non-standard form. The first step is to convert it into the standard POS and map it. If you don’t want to convert in the non-standard form, just draw a truth table and pick out the input combinations that produce ‘zeros’ at the output. For POS expression, map zeros in the K-Map.

#### Example 11: Draw five variable Karnaugh Map from the following standard SOP expression:

\(\bar A B \bar C D \bar E+\bar A \bar B \bar C DE+A\bar B \bar C DE+AB \bar C \bar D \bar E +\\\bar A BCD \bar E + \bar A BC\bar D E+ \bar A \bar B \bar C\bar D \bar E+\\ \bar A \bar B CDE+AB\bar C D \bar E+AB\bar C DE\)For five variables, there are 25 = 32 cells. Instead of a single 32-cells K-Map, we use 2 16-cells K-Map. The expression is already in standard SOP format. Just carefully map it.

The simplified expression is:

\(\bar A \bar B \bar C \bar D \bar E + \bar A BC \bar D E + A B \bar C \bar D \bar E + \\\bar A \bar B DE + \bar A B D \bar E + AB \bar C D + A\bar C DE\)…