6. KARNAUGH MAPS

Topics:

• Truth tables and Karnaugh maps

Objectives:

• Be able to simplify designs with Boolean algebra and Karnaugh maps

Karnaugh maps allow us to convert a truth table to a simplified Boolean expression without using Boolean Algebra. The truth table in Figure 6.1 Truth Table for a Burglar Alarm is an extension of the previous burglar alarm example, an alarm quiet input has been added.

 

Figure 6.1 Truth Table for a Burglar Alarm

Instead of converting this directly to a Boolean equation, it is put into a tabular form as shown in Figure 6.1 The Karnaugh Map. The rows and columns are chosen from the input variables. The decision of which variables to use for rows or columns can be arbitrary - the table will look different, but you will still get a similar solution. For both the rows and columns the variables are ordered to show the values of the bits using NOTs. The sequence is not binary, but it is organized so that only one of the bits changes at a time, so the sequence of bits is 00, 01, 11, 10 - this step is very important. Next the values from the truth table that are true are entered into the Karnaugh map. Zeros can also be entered, but are not necessary. In the example the three true values from the truth table have been entered in the table.

 

Figure 6.1 The Karnaugh Map

When bits have been entered into the Karnaugh map there should be some obvious patterns. These patterns typically have some sort of symmetry. In Figure 6.1 Recognition of the Boolean Equation from the Karnaugh Map there are two patterns that have been circled. In this case one of the patterns is because there are two bits beside each other. The second pattern is harder to see because the bits in the left and right hand side columns are beside each other. (Note: Even though the table has a left and right hand column, the sides and top/bottom wrap around.) Some of the bits are used more than once, this will lead to some redundancy in the final equation, but it will also give a simpler expression.

The patterns can then be converted into a Boolean equation. This is done by first observing that all of the patterns sit in the third row, therefore the expression will be ANDed with SQ. There are two patterns in the third row, one has M as the common term, the second has W as the common term. These can now be combined into the equation. Finally the equation is converted to ladder logic.

 

Figure 6.1 Recognition of the Boolean Equation from the Karnaugh Map

Karnaugh maps are an alternative method to simplifying equations with Boolean algebra. It is well suited to visual learners, and is an excellent way to verify Boolean algebra calculations. The example shown was for four variables, thus giving two variables for the rows and two variables for the columns. More variables can also be used. If there were five input variables there could be three variables used for the rows or columns with the pattern 000, 001, 011, 010, 110, 111, 101, 100. If there is more than one output, a Karnaugh map is needed for each output.

 

Figure 6.1 Aside: An Alternate Approach