In the previous tutorial, all thepossible boolean functionsbetween two variables were discussed. In the tutorial – Boolean Algebra, various theorems and postulates were stated which are useful in simplifying a boolean expression or function. However, the simplification of a boolean expression using theorems and postulates is quite cumbersome and prone to errors. Therefore, for simplification of boolean expressions, some map methods were devised. The most commonly used map method is Karnaugh Map or K-Map.
These methods are based on the fact that every boolean function has a unique truth table. A boolean function can be represented by several boolean expressions but its truth table will always remain the same. This is due to the fact that a digital circuit will always have fixed outputs or response corresponding to the inputs. Let us first discuss, K-map.
Karnaugh Map –
The Karnaugh map is the most common simplification technique for boolean expressions. It is based on the following facts –
1) Any boolean function however may be represent able in several forms or boolean expressions always have a unique truth table. If two boolean expressions have same truth table, they are the same function.
2) Any boolean function can be represented by sum of products (Minterms) or product of sums (Maxterms).
3) The sum of Minterms or product of Maxterms is reducible by applying various boolean theorems.
k映射基本上是真实表的表达式表示。例如,两个变量函数可以具有以下真相表 -
Fig. 1:Truth Table of a Two-Variable Boolean Function
Fig. 2:Image showing K-Map of a Two-Variable Boolean Function
K-Map is useful is minimizing boolean expressions containing up to 5 variables or less. Once the map is constructed, the minimized expression can be deduced by the following process –
1) Enter 1s in those cells corresponding to the combinations for which the function value is 1 in the truth table. Then, fill 0s in the remaining cells of the K-map. Each cell in the map represents a Minterm. The boolean function represented by the map (the map is just a graphical representation of truth table) is sum of the minterms which may contain one or more boolean variables as literals.
2) Examine the map for 1-valued cells that cannot be combined with any other 1-valued cell or form groups with other 1-valued cells. That means identify 1-valued cells that have no adjacent 1-valued cell. Such groups represent minterms containing all the boolean variables as literals in the term as part of the boolean function.
3)检查地图是否仅彼此相邻的1个值的细胞,仅1值单元格,并形成仅包含两个1个1值细胞的组,但不属于包含四个或八个1个1值细胞的任何组的一部分。这样的组表示包含布尔变量的最小变量,作为函数一部分的术语中的最大布尔变量数量的最大数量。这样的组称为对。
4) Examine the map for 1-valued cells that are adjacent to only three another 1-valued cells and form groups containing only four 1-valued cells but are not part of any group containing eight 1-valued cells. Such groups represent minterms containing boolean variables as literals two less than the maximum number of boolean variables in the term as part of the function. Such groups are called quads. In a 2-variable function, the formation of quad means the output of function is 1.
5) Examine the map for 1-valued cells that are adjacent to seven another 1-valued cells and form groups containing eight 1-valued cells but are not part of any group containing sixteen or higher 1-valued cells. Such groups represent minterms containing boolean variables as literals three less than the maximum number of boolean variables in the term as part of the function. Such groups are called octets. In a 3-variable function, the formation of octet means the output of function is 1.
6)形成所有单打,对,四核和八位字组,使组数量最少。在地图的相对边缘,对1值细胞的组合也可以形成对,四核和八位字。就像在以下k-Map中用于3变量的布尔函数一样,拐角处的M0和M8也形成了一对。
Fig. 3:Image showing K-Map of a Three-Variable Boolean Function
7) Remove any redundant groups.
8) A 1-valued cell with no adjacent 1-valued cell gives a Minterm containing 2, 3, 4, 5 variable term for 2-variable, 3-variable, 4-variable and 5-variable boolean function or K-map respectively. A pair of 1-valued cells gives a Minterm containing 1, 2, 3, 4 variable term for 2-variable, 3-variable, 4-variable and 5-variable boolean function or K-map respectively. A quad of 1-valued cells gives a Minterm containing 1, 2, 3 variable term for 3-variable, 4-variable and 5-variable boolean function or K-map respectively. The formation of quad for a 2-variable function means it is equal to 1. An octet of 1-valued cells gives a Minterm containing 2 or 3 variable term for 4-variable and 5-variable boolean function or K-map respectively. The formation of octet for a 3-variable function means it is equal to 1.
9)如果一个1-valued细胞识别,它代表resents a Minterm having the boolean variable as literal in the term for been matched to value of 1 for the respective boolean variable and/or having complement of the boolean variable as literal in the term for been matched to value 0 for the respective boolean variable. Such 1-valued cell will induct a Minterm in the function containing all the boolean variables either in compliment or normal form. If a pair is identified, one boolean variable will be eliminated and a Minterm containing one less number of maximum boolean variables is inducted in the boolean function. Similarly, a quad leads to elimination of two boolean variables in the Minterm and so on. The boolean variable having a bit change within the pair, quad or octet is eliminated in the term.
10) The boolean function is the logical sum of the Minterms generated by all the groups. The boolean function as product of sum can be similarly generated by groups of 0s.
两变量的k映射–
A two-variable K-map has four cells as the maximum number of minterms possible with two boolean variables is 4 (2^2). There can be maximum 16 functions (2^2*2) generated by two boolean variables.
Fig. 4:Image showing K-Map of a Two-Variable Boolean Function by Minterms
A function generated by a two-variable K-map is reducible by single 1-valued cells or pairs. The formation of a quad in two-variable K-map means the function is equal to 1.
Three-variable K-map–
A three-variable K-map has eight cells as the maximum number of minterms possible with three boolean variables is 8 (2^3). There can be maximum 64 functions (2^2*3) generated by three boolean variables.
Fig. 5:Image showing K-Map of a Three-Variable Boolean Function by Minterms
A function generated by a three-variable K-map is reducible by single 1-valued cells, pairs or quad. The formation of an octet in three-variable K-map means the function is equal to 1.
Four-Variable K-map–
A four-variable K-map has sixteen cells as the maximum number of minterms possible with four boolean variables is 16 (2^4). There can be maximum 256 functions (2^2*4) generated by four boolean variables.
Fig. 6:图像显示了Minterms的四变量布尔功能的k图
由单个1值单元,对,四边形或八位字可以降低由四变量k映射产生的函数。在四变量的k-map中形成16个单值细胞意味着该函数等于1。
Five-Variable K-map–
A five-variable K-map has thirty two cells as the maximum number of minterms possible with five boolean variables is 32 (2^5). There can be maximum 1024 functions (2^2*5) generated by five boolean variables.
Fig. 7:Image showing K-Map of a Five-Variable Boolean Function by Minterms
A function generated by a five-variable K-map is reducible by single 1-valued cells, pairs, quads, octets or group of 16 1-valued cells. The formation of 32 single-valued cells in five-variable K-map means the function is equal to 1.
不在乎组合–
没有必要为一个布尔值,所有输出function be always known. In digital circuits, there can be possibility where for certain combinations, the output can be either 1 or 0. In such case, either d, x or Ø is inserted in the K-map for the corresponding input combinations. For deriving the boolean expression, either 1 or 0 can be assumed at don’t care combinations to deduce a minimal sum of products or product of sum expression.
Quine-McCluskeyMethod–
The K-map is useful in deducing boolean expressions involving four boolean variables or less. Further, it gets complex. So, another method called Quine-McCluskey method is used for deducing boolean expressions involving four or more boolean variables. Quine-McCluskey method is a tabular method for deriving the minimal boolean expression. From the truth table of a boolean function, the combinations for which the output of the function is 1 can be listed. These combinations can be indexed in ascending order as binary numbers. For example, suppose there is a boolean function involving four boolean variables (A, B, C, D) having the following truth table –
Fig. 8: Truth Table of a Four-Variable Boolean Function
The combinations resulting into 1 on being indexed in ascending order as binary numbers gives the following table for the above case
Fig. 9: Table used inQuine-McCluskeyMethod for Four-Variable Boolean Function
This boolean function can be written as follow –The combinations resulting into 1 on being indexed in ascending order as binary numbers gives the following table for the above case –
F (A, B, C, D)= ∑ (0, 5, 8, 9, 10, 11, 14, 15)
在第一步Quine-McCluskeymethod, the minterms are arranged in groups by the number of 1s in them as follow –
Fig. 10: Table used inQuine-McCluskeyMethod for Four-Variable Boolean Function
Any two minterms in adjacent groups like group 0 and 1, group 1 and 2 or group 2 and 3 and so on are now compared and examined for change in the value of only one boolean variable. Such minterms are selected as匹配和tabulated as pairs in the next step with a dash inplacewheresingleboolean variable has changed for the match like as follow –
图11:使用的表Quine-McCluskeyMethod for Four-Variable Boolean Function
In the next step, the matches in the adjacent groups fromtablein step 2 are compared and examined fordashfor the same variable and change in the value of only one boolean variable. Such matches are selected as quads and tabulated in the next table with a dash inplacewheresingleboolean variable has changed for the match. The pairs in second table and minterms infirsttable that were not matched in the respective tables are also tabulated in the next table (third table) as follow –
Fig. 12: Table used inQuine-McCluskeyMethod for Four-Variable Boolean Function
The quads, pairs or singles derived in the third table (removing the redundant ones) are called prime implements. In the next step, the prime implements are tabulated against minterms and the minterms included in the respective prime implement (quad, pair or single) is marked by X against the respective prime implement as follow –
Fig. 13: Table used inQuine-McCluskeyMethod for Four-Variable Boolean Function
在最后一个表中,检查了具有单个X的列,并确定了包含此类X的行。注意到这些行的主要工具,并将这些质量工具的术语包括在内sumof products in the boolean expression by comparison of prime implements and boolean variables from the third table. In the third table, the boolean variable against selected prime implement having value dash is not included, the boolean variable against selected prime implement having value 1 is included in normal form in the respective term and the boolean variable against selected prime implement having value 0 is included in赞扬form in the respective term. The selected prime implements fromfourthtable are called essential implements. For the above boolean function, in the fourth table, all the rows arehaving anX which is single in at least one column. So all rows are selected and all prime implements are essential implements for the boolean function. From第三table, the boolean expression for the function can be derived as follow –
F (A, B, C, D)= AB’ + AC + B’C’D’ + A’BC’D
Now with the knowledge of K-map and Quine-McCluskey method, any boolean function with a given truth table can be easily minimized. In the next tutorial, learn about logicgate implementationof a minimized boolean expression.
Filed Under:Featured Contributions
Questions related to this article?
Ask and discuss onEDAboard.com和Electro-Tech-Online.comforums.
告诉我们你的想法!!
You must belogged in发表评论。