And: Difference between revisions
Jump to navigation
Jump to search
(→External links: APLX) |
(Move LCM to its own page; see Talk:Or) |
||
Line 1: | Line 1: | ||
{{Built-in|And|∧}} is a [[dyadic]] [[scalar function|scalar]] [[boolean function]] which tests if both arguments are true: it returns 1 if both are 1 and 0 if one or both are 0. It represents the [[wikipedia:logical conjunction|logical conjunction]] in Boolean logic. | {{Built-in|And|∧}} is a [[dyadic]] [[scalar function|scalar]] [[boolean function]] which tests if both arguments are true: it returns 1 if both are 1 and 0 if one or both are 0. It represents the [[wikipedia:logical conjunction|logical conjunction]] in Boolean logic. In many APLs, And is a special case of the [[LCM]] function. | ||
{|class=wikitable | {|class=wikitable | ||
Line 28: | Line 28: | ||
0 | 0 | ||
</source> | </source> | ||
== External links == | == External links == |
Revision as of 15:09, 1 June 2020
∧
|
And (∧
) is a dyadic scalar boolean function which tests if both arguments are true: it returns 1 if both are 1 and 0 if one or both are 0. It represents the logical conjunction in Boolean logic. In many APLs, And is a special case of the LCM function.
∧ |
0 |
1
|
---|---|---|
0
|
0 |
0
|
1
|
0 |
1
|
Examples
The following shows all possible combinations of inputs as a Boolean function.
0 0 1 1 ∧ 0 1 0 1 0 0 0 1
When combined with Reduce, And can be used to test if every value in a Boolean vector is true.
∧/ 1 1 1 1 1 1 ∧/ 1 0 0 1 1 0