为什么简化布尔表达式中的括号不能用 AND 分隔?

Why can't brackets in a simplified Boolean expression be separated by an AND?

提问人:Montresor 提问时间:12/1/2021 最后编辑:Peter MortensenMontresor 更新时间:2/21/2022 访问量:354

问:

考虑这张 (A ∧ D) ∨ (B ∧ D) ∨ (A ∧ ¬B ∧ C ∧ D) 的地图:

Enter image description here

该地图分为两个部分,均为四个方块。 从而产生(B∧D)∨(A∧D)的简化表达,如下所示。

Enter image description here

这与以下规则一致:

“组必须包含 1、2、4、8 或一般 2^n 个单元格”

但是,如果我以这样的方式进行分组,即组包含六个单元格(不遵循 2^n 规则):

Enter image description here

这将产生以下简化表达式:

(A ∨ B) ∧ D

我已经运行了几次这个试验。甚至拆分 Karnaugh 地图,我将可能的 8 组分成 6 组和 4 组。我得出的结论是,当除以 6 或任何不是 2^n 的值时,表达式中括号之间的布尔值为 (AND),而当使用 2^n 的组时,拆分布尔值为 (OR)。

因此,由于大小不为 2^n 的组会产生 AND 除法(括号之间),这是否意味着布尔表达式中的括号不能用 AND 分隔?

通过代理,这就是为什么 Karnaugh 地图必须分组为 2n 个正方形组的原因吗?

注意

在线工具还专门使用OR分频器进行简化:如图所示

Enter image description here

布尔 逻辑 表达式 karnaugh-map

评论

0赞 njzk2 12/1/2021
“为什么布尔表达式中的括号不能用 AND 分隔?”谁告诉你的,在什么上下文中?
1赞 Montresor 12/1/2021
没有人告诉我这个。我最初试图回答为什么我不能有大于 2n 的组。如果一个组大于 2n,它总是会导致括号用 AND 分隔。我假设(这就是我的问题)这意味着简化布尔表达式中的括号不能用 AND 分隔
1赞 njzk2 12/1/2021
我想该方法是使用一些简化来更容易获得结果。但是,如果需要,可以使用 De Morgan 的 and 转换为 ors:这可以写成(它们是 8 + 2,它们之间有 OR)not(not D ∨ (not A ∧ not B))
1赞 Montresor 12/1/2021
有趣的假设。我会进一步测试。事实上,在这个过程中,我一直对某种程度的简化一无所知。
1赞 Andrew 2/21/2022
@njzk2 和 Montresor not(not D ∨ (not A ∧ not B)) 与 (B ∧ D) ∨ (A ∧ D) 相同。这可以显示如下: ~(~D + (~A . ~B)) = D .(A + B) 根据德摩根定理,和 D .(B + A) = (B .D) + (A .D)根据分配法。

答:

2赞 Andrew 2/20/2022 #1

(B ∧ D) ∨ (A ∧ D) 是此 Karnaugh 映射的正确“乘积总和”表达式,(A ∨ B) ∧ D 是等价表达式(根据“OR 分配律”),但它不再是“乘积总和”形式。

您确实这样做了(而不是使用“OR 分配律”):您没有注意到(从 Karnaugh 映射的顶部)第一个 2x2 块的 B 值没有变化,第二个 2x2 块的 A 值没有变化,而是进一步注意到这两列大小为 2 重叠,形成由 (A ∨ B) 定义的三列。

这很好,但它没有给出“乘积总和”(AND'd 变量组或一起),这就是 2^n 规则所涉及的。相反,你偶然地得到了实际的“和的乘积”(OR'd 变量组 AND 在一起)。

获得最终结果的“正式”、“图形”、“传统”、“简单”等方式(也有 2^n 规则,但 0 而不是 1)是而不是 1,圈出 0,再次注意顶部和/或右侧的变量值不会改变,但这次不是这些值。在您的示例中,顶部的四个 0 和底部的四个 0 产生 D“总和”(请注意,这个“圆”从顶部到底部形成一个“逻辑”圆圈)。剩下的两个 0 与它们上面的 0 和它们下面的 0 组合在一起,产生 (A ∨ B) “总和”(这个想法是覆盖所有 0,同时选择最大的 2^n 块,即使它们重叠)。(A∨B)∧D是这两个“和”的“乘积”。查看:Minterm 与 Maxterm 解决方案

The method is "perfect" (as long as the "circles" are as big as possible and nothing is missed). If the "circles" are not as big as possible (but nothing is missed), the result will still be logically correct, but it will use more gates than the minimum.

评论

0赞 Montresor 2/20/2022
That is very interesting about the different laws and techniques used, could you hypothesise or do you know any reasons for why one technique would be used instead of another?
1赞 Andrew 2/21/2022
@Montresor It could depend on the chips being used, the design of the software being written, or simply personal preference. Sometimes both methods are tried, and the cheaper (usually the one with less gates) circuit is used, or the "better" (usually the one with less lines) code is used.
1赞 Andrew 2/21/2022
for exams, you should know both; also: go over kmaps and race conditions
1赞 Andrew 2/21/2022
Note: The original post of (A ∧ D) ∨ (B ∧ D) ∨ (A ∧ ¬B ∧ C ∧ D) = (A ∧ D) ∨ (B ∧ D); Proof: (A ∧ D) ∨ (A ∧ ¬B ∧ C ∧ D) ∨ (B ∧ D) (associative property) = (A ∧ D) ∨ (A ∧ D ∧ ¬B ∧ C) ∨ (B ∧ D) (associative property) = (X) ∨ (X ∧ ¬B ∧ C) ∨ (B ∧ D) (substitutuion) = (X) ∨ (X ∧ Y) ∨ (B ∧ D) (substitutuion) = (X) ∨ (X ∧ Y) ∨ (B ∧ D) = (X) ∨ (B ∧ D) (OR absorption law) = (A ∧ D) ∨ (B ∧ D) (substitutuion); also can be seen from the Karnaugh map since the (A ∧ ¬B ∧ C ∧ D) block is already contained in the (A ∧ D) block.
1赞 Andrew 2/21/2022
Here is a good link (explains "OR absorption law", for example): [Laws of Boolean Algebra][3] [3] electronics-tutorials.ws/boolean/bool_6.html.