# What’s Karnaugh Map?

K map full form is Karnaugh Map. Karnaugh map in digital electronics is a method to simplify Boolean expressions. It is a simple and easy way to simplify Boolean expressions without memorizing the Boolean laws and Boolean theorems. We just need to follow the rules of the k map method and that’s it.

There are many types of K map e.g 2 variable k map, 3 variable k map, 4 variable k map, 5 variable k map etc. but the Boolean expressions with up to 4 variables can be easily simplified Karnaugh maps.

In this lecture we will briefly discuss this method. First we will discuss the rules of Karnaugh map and then we will solve k map examples.

## Rules of K-MAP:

I will discuss the rules in case of 3 variable Karnaugh map but these rules can be applied to any type:

1. There are 2^n cells. Where ‘n’ is the number of variables.

2. Groups must not include any cell containing a zero.

3. Groups are made only horizontal, not diagonal.

4. Groups may overlap.

5. Groups must contain 1, 2, 4, 8, or in general 2^n cells

6. It should be as large as possible. Here the rule is to make the minimum number of groups and each group must contain the maximum number of cells.

I will explain to you later in the examples how we can write 1’s and 0’s within the cells.

## Karnaugh Map Examples:

**Example 1:**

Simplify this Boolean function

**F = X Y’ + X’ Y + X’Y’**

There are two variables in this example i.e X and Y. So we need 4 cells in k map truth table. It’s up to you either you place X or Y on the horizontal or vertical side. It doesn’t make any difference. Because we know from Boolean Algebra Laws that is X.Y = Y.X.

The variable X can have two possible states i.e 1 or 0. The value 1 means variable X and 0 means the complement of X which is represented here as X’.

Before putting 1s and 0s in the table you must know what a Minterm is. Minterm is the product of all variables with or without complement. In the given function above the XY’, X’Y and X’Y’ are the minterms. The following figure explains the possible minterms in each cell. This is very important to understand before putting 1s and 0s in the cells.

Now we put 1s in the map. For every minterm in the given function we write 1 in place of that minterm in the Karnaugh table. See the figure below

In the remaining box/boxes you can put 0s. But 0s are not usable so its a good practice to leave those boxes blank. Now make groups as per the rules discussed above

**Group 1 Maxterm: X’Y’+X’Y**

X’Y’+X’Y = X’(Y’+Y) = X’.1 = X’

**Group 2 Maxterm: X’Y’+XY’**

X’Y’+XY’= Y’(X+X’) = Y’.1 = Y’

The simplified Boolean Function is

**F= X’+Y’**

### Watch 2 Variable K Map tutorial in Urdu/Hindi below:

## Example 2:

Simplify Boolean Function using K-Map Method

**F1 = XY’Z’ + XYZ + X’YZ + XYZ’**

This is a three variable K map example so we need 8 cells. The following figure shows 8 cells. To label the cells horizontally or vertically I separated X and YZ. This is not a rule you can do this whatever you like. The end result would be the same.

The following figure explains the possible minterms in each cell.

Now we put 1s in the map

Now make groups as per the rules discussed above

Here you can observe the extreme terms also make groups.

**Group 1 Maxterm: X’YZ+XYZ**

X’YZ+XYZ = YZ(X’+X) = YZ.1 = YZ

**Group 2 Maxterm: XYZ’+XY’Z’**

XYZ’+XY’Z’ = XZ’(Y+Y’) = XZ’.1 = XZ’

The simplified Function is

**F1 = YZ+XZ’**

### Watch 3 Variable K Map tutorial in Urdu/Hindi below:

Anonymous

Sir. Great work for students..

Asif Haroon

thank you my dear