我遇到了以下问题:
The following table describes the output d of a Boolean fun with three input values a, b, and c.
a b c | d ----------+---- 0 0 0 | 1 0 0 1 | 1 0 1 0 | 1 0 1 1 | 0 1 0 0 | 0 1 0 1 | 0 1 1 0 | 0 1 1 1 | 0
Give this Boolean function using a suitable combination of AND, OR, XOR, NOT, NAND, NOR or XNOR.
为什么是正确答案:
d := (((NOT a) AND (NOT b)) AND (NOT c)) OR
(((NOT a) AND (NOT b)) AND c) OR
(((NOT a) AND b) AND (NOT c))
我的答案。 (((不是 a) 和 (不是 b)) 和 (不是 c))
a b c d
===============
0 0 0 1
.
.
.
这是怎么推导出来的?
最佳答案
您给出的答案称为乘积和 (SOP) 公式。查看由 OR 连接的三个大项:
((NOT a) AND (NOT b)) AND (NOT c))
((NOT a) AND (NOT b)) AND c)
((NOT a) AND b) AND (NOT c)
现在看看真值表,其中恰好三行的 d 列中有 1。这三行中的每一行都对应三个术语中的一个。
可以编写更简短的答案,例如 d := (NOT a) AND (NOT(b AND c))
,但它们不是您给出的积和公式。
关于boolean-logic - 从描述 bool 函数输出 d 的表中导出 bool 函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10870759/