逻辑和/算术/乘积

发布于 2024-11-18 06:59:37 字数 54 浏览 1 评论 0原文

假设我需要为某些输入构建一个真值表,它要求我提供逻辑和、算术和和逻辑乘积。它们之间有什么区别?

suppose I need to construct a truth table for some inputs and it is asking me for the logical sum, arithmetic sum, and logical product. What is the difference between those?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

痴情 2024-11-25 06:59:37

逻辑和 - 一种计算机加法,当一个或两个输入变量为 1 时,结果为 1;当输入变量均为 0 时,结果为 0。 (answers.com)

算术和 - 1+1

逻辑积 -两个命题 p、q 的逻辑乘积是它们的合取,p & q。 q. (answers.com)

Logical Sum - A computer addition in which the result is 1 when either one or both input variables is 1, and the result is 0 when the input variables are both 0. (answers.com)

Arithmetic sum - 1+1

Logical product - The logical product of two propositions p, q, is their conjunction, p & q. (answers.com)

似最初 2024-11-25 06:59:37

谈论算术和和真值表没有多大意义。算术和是我们在学校学到的“常规”和,例如

2 + 3 = 5  

您要问的逻辑和可能意味着 OR,OR 的真值表是:

1 + 1 = 1  
1 + 0 = 1  
0 + 0 = 0  

而乘积是 AND,遵循以下逻辑:

1 + 1 = 1  
1 + 0 = 0  
0 + 0 = 0  

它们是都是可交换的。

It does not make a lot of sense to speak of arithmetic sums and truth tables. An arithmetic sum is the "regular" sum that we learn in school, such as

2 + 3 = 5  

The logical sum you're asking probably means an OR, the truth table for OR is:

1 + 1 = 1  
1 + 0 = 1  
0 + 0 = 0  

And the product is an AND, which follows this logic:

1 + 1 = 1  
1 + 0 = 0  
0 + 0 = 0  

They are all commutative.

故事与诗 2024-11-25 06:59:37

算术和是您所习惯的:您只需将数字加在一起,就像从一年级开始就做的那样。逻辑和是“或”运算,其中如果任一输入非零,则值为 1;如果两者都为零,则值为 0。

逻辑积使用“与”运算符。仅当两个输入均非零时,结果才为 1;如果至少其中一个输入为零,则结果为 0。

The arithmetic sum is what you're used to: You just add the numbers together like you did since first grade. The logical sum is an "or" operation, in which the value is 1 if either input is non-zero, or 0 if they're both zero.

The logical product uses the "and" operator. The result is 1 only if both inputs are non-zero, and 0 if at least one of the inputs is zero.

乜一 2024-11-25 06:59:37

“逻辑和”和“逻辑积”是指“或”和“与”的非常令人困惑的方式。这是指符号:

a b = a AND b
a + b = a OR b

"Logical sum" and "logical product" are very confusing ways to refer to "or" and "and". This is referring to the the notation:

a b = a AND b
a + b = a OR b
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文