假设函数 F(A,B,C,D) = m(0, 1, 5, 7, 8, 10, 14, 15) 转换为这个真值表(并且没有“不在乎"状态):
index | ABCD | output
----------------------------------------
0 | 0000 | 1 ... m_0 = ¬A·¬B·¬C·¬D
1 | 0001 | 1 ... m_1 = ¬A·¬B·¬C·D
2 | 0010 | 0 M_2 = A + B + ¬C + D
3 | 0011 | 0 M_3 = A + B + ¬C + ¬D
4 | 0100 | 0 M_4 = A + ¬B + C + D
5 | 0101 | 1 ... m_5 = ¬A·B·¬C·D
6 | 0110 | 0 M_6 = A + ¬B + ¬C + D
7 | 0111 | 1 ... m_7 = ¬A·B·C·D
8 | 1000 | 1 ... m_8 = A·¬B·¬C·¬D
9 | 1001 | 0 M_9 = ¬A + B + C + ¬D
10 | 1010 | 1 ... m_10 = A·¬B·C·¬D
11 | 1011 | 0 M_11 = ¬A + B + ¬C + ¬D
12 | 1100 | 0 M_12 = ¬A + ¬B + C + D
13 | 1101 | 0 M_13 = ¬A + ¬B + C + ¬D
14 | 1110 | 1 ... m_14 = A·B·C·¬D
15 | 1111 | 1 ... m_15 = A·B·C·D
相应的最小项总和(规范 DNF)如下所示:
F(A,B,C,D) = ∑(m_0, m_1, m_5, m_7, m_8, m_10, m_14, m_15) =
= m_0 + m_1 + m_5 + m_7 + m_8 + m_10 + m_14 + m_15 =
= ¬A·¬B·¬C·¬D + ¬A·¬B·¬C·D + ¬A·B·¬C·D + ¬A·B·C·D +
+ A·¬B·¬C·¬D + A·¬B·C·¬D + A·B·C·¬D + A·B·C·D .
您可以在第一张卡诺图中看到规范(完整)DNF(单独圈出)的所有最小术语:
m_0 = ¬A·¬B·¬C·¬D (blue)
m_1 = ¬A·¬B·¬C·D (purple)
m_5 = ¬A·B·¬C·D (green)
m_7 = ¬A·B·C·D (orange)
m_8 = A·¬B·¬C·¬D (black)
m_10 = A·¬B·C·¬D (yellow)
m_14 = A·B·C·¬D (brown)
m_15 = A·B·C·D (pink)
第二个 K-map显示了原始函数的最小 DNF:
F(A,B,C,D) = ¬A·¬B·¬C (blue) + ¬A·B·D (purple) + A·¬B·¬D (orange) + A·B·C (green)
第三个 K-map也是最小 DNF,但与先前的表达式不同:
F(A,B,C,D) = ¬B·¬C·¬D (orange) + ¬A·¬C·D (blue) + A·C·¬D (green) + B·C·D (purple)
您还可以使用maxterms将原始输出函数表示为它们的乘积。这将是规范的 CNF:
F(A,B,C,D) = ∏(M_2, M_3, M_4, M_6, M_9, M_11, M_12, M_13) =
= M_2·M_3·M_4·M_6·M_9·M_11·M_12·M_13 =
= (A + B + ¬C + D)·(A + B + ¬C + ¬D)·(A + ¬B + C + D)·
·(A + ¬B + ¬C + D)·(¬A + B + C + ¬D)·(¬A + B + ¬C + ¬D)·
·(¬A + ¬B + C + D)·(¬A + ¬B + C + ¬D) .
第二张图的第一个K-map分别圈出了原函数的所有maxterms:
M_2 = A + B + ¬C + D (purple)
M_3 = A + B + ¬C + ¬D (green)
M_4 = A + ¬B + C + D (blue)
M_6 = A + ¬B + ¬C + D (orange)
M_9 = ¬A + B + C + ¬D (pink)
M_11 = ¬A + B + ¬C + ¬D (yellow)
M_12 = ¬A + ¬B + C + D (black)
M_13 = ¬A + ¬B + C + ¬D (brown)
第二张图的第二张和第三张 K-map都显示了原始函数的最小 CNF(可能不止一个):
F(A,B,C,D) = (A + B + ¬C) ... blue
·(A + ¬B + D) ... purple
·(¬A + B + ¬D) ... orange
·(¬A + ¬B + C) ... green
F(A,B,C,D) = (¬B + C + D) ... orange
·(A + ¬C + D) ... green
·(B + ¬C + ¬D) ... purple
·(¬A + C + ¬D) ... blue
如果您有任何其他问题,请评论我的回答。
图片是使用乳胶生成的。