30 Okt
30 Okt
Table -Applies Numerical and Alphabetical descending order Karnaugh Maps are used for many small design problems. It's true that many larger designs are done using computer implementations of different algorithms. However designs with a small number of variables occur frequently in interface problems and that makes learning Karnaugh Maps worthwhile. In addition, if you study Karnaugh Maps you will gain a great deal of insight into digital logic circuits. In this section we'll examine some Karnaugh Maps for three and four variables. As we use them be particularly tuned in to how they are really being used to simplify Boolean functions. A Karnaugh Map is a grid-like representation of a truth table. It is really just another way of presenting a truth table, but the mode of presentation gives more insight. A Karnaugh map has zero and one entries at different positions. Each position in a grid corresponds to a truth table entry. Here's an example taken from the voting circuit presented in the lesson on Minterms. The truth table is shown first. The Karnaugh Map for this truth table is shown after the truth table.
A 0 0 0 0 1 1 1 1
B 0 0 1 1 0 0 1 1
C 0 1 0 1 0 1 0 1
V 0 0 0 1 0 1 1 1
At first, it might seem that the Karnaugh Map is just another way of presenting the information in a truth table. In one way that's true. However, any time you have the opportunity to use another way of looking at a problem advantages can accrue to you. In the case of the Karnaugh Map the advantage is that the Karnaugh Map is designed to present the information in a way that allows easy grouping of terms that can be combined. Let's start by looking at the Karnaugh Map we've already encountered. Look at two entries side by side. We'll start by focussing on the ones shown below in gray.
The term on the left in the gray area of the map corresponds to:
o
The term on the right in the gray area of the map corresponds to:
o
The beauty of the Karnaugh Map is that it has been cleverly designed so that any two adjacent cells in the map differ by a change in one variable. It's always a change of one variable any time you cross a horizontal or vertical cell boundaries. (It's not fair to go through the corners!) Notice that the order of terms isn't random. Look across the top boundary of the Karnaugh Map. Terms go 00, 01, 11, 10. If you think binary well, you might have ordered terms in order 00, 01, 10, 11. That's the sequence of binary numbers for
0,1,2,3. However, in a Karnaugh Map terms are not arranged in numerical sequence! That's done deliberately to ensure that crossing each horizontal or vertical cell boundary will reflect a change of only one variable. In the numerical sequence, the middle two terms, 01, and 10 differ by two variables! Anyhow, when only one variable changes that means that you can eliminate that variable, as in the example above for the terms in the gray area. Take a look at this.
Notice the red lines grouping and blue lines grouping (again, diagonal grouping is NOT allowed) The red grouping can be taken as: Sum of Product(SOP)= ( AB C )( ABC ) AC (since B and B produce nothing)
Therefore, the blue group is also:
SOP= ( A BC )( ABC ) BC (since A and A produce nothing) Try to find one more group, with left only 1 at the bottom right corner as part of the group.(The SOP result will be AB.
So far we have focussed on K-maps for three variables. Karnaugh Maps are useful for more than three variables, and we'll look at how to extend ideas to four variables here. Shown below is a K-map for four variables.
There are 16 cells in the map. Anytime you have N variables, you will have 2N possible combinations, and 2N places in a truth table or Karnaugh Map. Imagine moving around in the Karnaugh Map. Every time you cross a horizontal or vertical boundary one - and only one - variable changes value. The two pairs of variables - WX and YZ - both change in the same pattern.
Otherwise, if you can understand a Karnaugh Map for a three-variable function, you should be able to understand one for a four-variable function. Remember these basic rules that apply to Karnaugh maps of any size.
In a Karnaugh Map of any size, crossing a vertical or horizontal cell boundary is a change of only one variable - no matter how many variables there are. Each single cell that contains a 1 represents a minterm in the function, and each minterm can be thought of as a "product" term with N variables. To combine variables, use groups of 2, 4, 8, etc. A group of 2 in an N-variable Karnaugh map will give you a "product" term with N-1 variables. A group of 4 will have N-2 variables, etc. You will never have a group of 3, a group of 5, etc. Don't even think about it. See the points above.
Let's look at some examples of groups in a 4-variable Karnaugh Map. Example 1 - A Group of 2 Here is a group of 2 in a 4-variable map.
Now, lets try doing greater simplification. Look at the k-map below!
Upper left corner -> Upper right corner -> Lower left corner -> Lower right corner ->
By combining the first two terms above (the two terms at the top of the Karnaugh Map):By combining the last two terms above (the two terms at the bottom of the Karnaugh Map):Then, these two germs can be combined to give:
o o o
Some Further Observations There are a few further observations that should be made. Note the following.
There may well be more than one solution of equal complexity. o Here is an example Karnaugh Map. There are two groups that are obvious - one in orange, and one in light blue.
There is still one entry to account for. There is a 1 that can be joined to either of two other entries to form a
group. There is no best way to go on this. Either way will take the same number of gates, inputs, etc.