• No results found

Simplification by using Karnaugh maps

In document Electrical Technology Grade 12 (Page 162-168)

Just as with Boolean algebra, Karnaugh maps are use to simplify Boolean expressions or truth tables. It is just a more graphical form of simplification. A Karnaugh map is simply a big block with a number of smaller cells where each cell represents a specific row in the corresponding truth table, or a term in the Boolean expression. A Karnaugh map can be filled in or populated from a Boolean expression or a truth table. Karnaugh maps comes in different sizes depending on the number of cells. If the Boolean expression or truth table has 2 variables, then the Karnaugh map will have 22 = 4 cells, if there is 3 variables, then the Karnaugh map will have 23= 8 cells and if there is 4 variables then the the Karnaugh map will have 24 = 16 cells. You can get Karnaugh maps with more cells, but we will stop at the 4 variable Karnaugh map.

It is important to note that Karnaugh maps are also labelled in a specific way and it is important that you remember it. Have a close look at the Karnaugh maps below and learn how to draw and label them.

2 Variable map: A.B

3 Variable map: A.B.C

OR

4 Variable map: A.B.C.D

Figure 6.22: Different size Karnaugh maps Populating (filling in) of the Karnaugh map

Now that you can draw and label the Karnaugh maps, let us fill the information from the Boolean expression or truth table into the map. The steps are the same for all sizes of maps, but we will do an example of a 4 variable Karnaugh map. It must be remembered that each term of the Boolean expression is represented by a

‘1’ in the Karnaugh map and all the other cells of the map will have a ‘0’ in it. With reference to the truth tables, the output of each row is plotted in the respective position in the Karnaugh map.

Simplify the Boolean expression and or truth tables by making use of Karnaugh maps.

Example:

F = A.B.C.D + A.B.C.D + A.B.C.D + A.B.C.D + A.B.C.D + A.B.C.D

Remember that each term of the Boolean expression has a corresponding place in the Karnaugh map as indicated in figure 6.22 above e.g. Term A.B.C.D is represented by position where A=1, B = 1, C= 1 and D=1 in the Karnaugh map i.e. position (1111)

With reference to the truth table below each row is represented by a specific position in the Karnaugh map eg row 1111 is represented by the position where A=1, B=1 , C=1 and D=1 in the Karnaugh map ie position (1111).

A B C D OUT

Figure 6.23: Four variable truth table

Let us now refer back to our example as set out above.

Step 1

Draw and label the Karnaugh map.

Step 2

Plot the information from the Boolean expression/ truth table into the map.

(Note for our example the information for the Boolean expression and truth table is exactly the same, so the Karnaugh map will also be the same.)

Step 3

Group the ‘1s’ together in specified group sizes.

The aim of grouping the 1s together is to get the biggest possible group of 1s together, in order to give us the simplest output term. These groups must consist of only 1s that are adjacent to one another. This means the 1s must only be above, below and alongside each other. A group cannot consist of 1s diagonally across from each other. All groups should be marked with a loop/circle as will be indicated below. Groups can overlap ie. a 1 can be shared by two or more groups, provided it makes the other groups bigger. Let us look at some examples to show what grouping is all about before we continue with this example.

Possible group sizes are as follow:

The smallest group consist of only 1 logic 1 The next group size is 2 1s

The next group size is 4 1s The next group size is 8 1s

And the biggest possible group size will consist of 16 1s.

Take note The bigger the group the simpler the term.

Examples of Karnaugh map groupings

Two groups of 1 only Two groupls of 2 1’s

Two groups of 2 1’s only One group of 4 1’s connected by sides of Karnaugh map and 1 group of 2

One group of 4 1’s and one group One group of 4 1’s and one group of 2 1’s of 2 1’s

One group of 8 1’s Two groups of 4 1’s and one group of 2 1’s connect top and bottom sides of Karnaugh map

One group of 8 1’s (connected Two groups of 4 1’s and two groups by the sides of the Karnaugh of 2 1’s

map and one group of 4 1’s

Figure 6.24: Different examples of grouping of Karnaugh maps Step 4

Extracting the simplified Boolean expression from the Karnaugh map.

Each group in the Karnaugh map represents a term, the bigger the group the simpler the term. All terms are separated by an OR (+) sign. The following example will explain the process more clearly.

Example 1

Simplify the following Boolean expression. F = A.B + A.B + A.B

To get the simplified expression for each group, examine each group individually.

Remember each group represents a simplified term. This Boolean expression will have two simplified terms.

Let us examine group 1 first.

Compare the condition of A and B in both cells making up group 1. If the condition of a variable changes from one cell to the next within the same group (when a variable is complimented) then that variable is discarded/eliminated, and if the condition of a variable remains the same within the group then that variable remains as part of the simplified answer.

In group 1, A is changing from a 0 to a 1 and can therefore be eliminated.

Variable B remains constant at 0 and will be part of term 1.

Our simplified term for group 1 = B

Now let us examine group 2.

Variable A remains constant at 1 in both cells, but variable B changes from a 0 to a 1. Our simplified term for group 2= A

Our simplified Boolean expression will therefore be F = B + A

This whole process sounds very complicated, but with some practice it will become quite easy. The following basic rules will help you do Karnaugh map simplifications.

• Determine the size of the Karnaugh map.

• Label the Karnaugh map correctly.

• Record the 1s and 0s in the Karnaugh map.

• Group the adjacent 1s in correct size groups

• Simplifying by eliminating variables that is changing within the group (variables that is complimented within a group)

• Write the simplified answer in sum-of-products notation.

Let us do a few more examples to consolidate Karnaugh map simplification.

Example 2

Simplify the following Boolean expression by making use of Karnaugh maps.

F = A.B.C + A.B.C + A.B.C + A.B.C

Group 1 = B.C (A changed from 0 → 1) Group 2 = A.B (C changed from 0 → 1) Group 3 = A.C (B changed from 0 → 1)

∴ Simplified equation F = B.C + A. B + A.C Example 3

Simplify the following Boolean by making us of Karnaugh maps.

F = A.B.C.D + A.B.C.D + A.B.C.D + A.B.C.D + A.B.C.D + A.B.C.D

Group 1 = B.D (A & C changed from 0 → 1) Group 2 = A.B.D (C changed from 0 → 1)

∴ Simplified equation F = B.D + A.B.D

In document Electrical Technology Grade 12 (Page 162-168)