boolean-logic - 从描述 bool 函数输出 d 的表中导出 bool 函数

标签 boolean-logic truthtable

我遇到了以下问题:

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/

相关文章:

c++ - 检索具有非常量变量的真值表的单行

boolean-logic - 真值表归结为三元逻辑运算,vpternlog

C : 0 & 1 combinations using recursion

algorithm - ROBDD的组成

python - 当我们用逻辑运算符返回时,Python 返回什么?

java - ElasticSearch boolean 查询结果不匹配

algorithm - 了解 Prime XOR 的社论 - HackerRank

circuit - 数字逻辑 - 卡诺图

java - 真值表数组

python - Python numpy 数组(和 Pandas 索引)中不区分大小写的逻辑