Computer Engineering Concepts |
Like truth tables, logic maps are another convenient method of representing the outcomes of a logical operation. These maps are also known as Karnaugh maps or simply K-maps. In a truth table the results are represented in a tabular form, but the same information could be represented in a visual form called a logic map. Consider the outcomes of the logical operation AND and OR on two propositions (x and y). As discussed earlier each proposition can have one of two possible states (1 or 0) for a total number of possible combinations of four. The results can be represented in the following form. This form is called a logic map.
Table 3.7 The AND operator logic map. Table 3.8 The OR operator logic map.
The highlighted squares indicate the results of the logical operations, and it is customary to neglect the 0 in the logic map. A blank space in the result section indicates a value of 0.The usefulness of logic maps will be seen later in chapter 6.
The logic map representation could be extended beyond just two propositions. A three proposition (x, y, and z) logic map should have a total of 8 squares to represent the results. One way to do it would be to envision it in space as shown figure 3.1. In this approach the axis would represent the three propositions.
Fig. 3.1. A three variable logic map
The spatial representation is not easy to easy to work with, so a map is created using the format shown in table 3.9, which can be thought of as the cube shown in figure 3.1 that has been opened up.
Table 3.9 A three variable logic map.
The map representation in table 3.9 can be easily extended to four variables and above as shown in table 3.10.
Table 3.10 A four variable logic map.
If the results of the truth table in table 3.6 are represented using a logic map it would be:
Table 3.9 Logic map for (pANDq)ANDr.
Unfortunately the logic map cannot be used to show the process involved in arriving at the result as in the truth table representation. It can however be used to represent the results effectively.
3.5 Practice Questions 1. Represent the results of the following logic operators using a logic map. a. XOR b. NAND c. NOR d. XNOR 2. Represent the results of the following logic expressions using a logic map. a. (p∙q)+p b. q’⊕ p c. p ↓ p’ d. (p∙q)⊕ (p+q) 3. Represent the results of the following logic expressions using a logic map. a. (r∙q)+p b. (r⊕ p)∙(q+p) d. (p+r)∙q’ f. (p+q)+(p+r) |