And: Difference between revisions

Jump to navigation Jump to search
335 bytes added ,  22:08, 10 September 2022
m
Text replacement - "<source" to "<syntaxhighlight"
(Move LCM to its own page; see Talk:Or)
m (Text replacement - "<source" to "<syntaxhighlight")
 
(5 intermediate revisions by 2 users not shown)
Line 2: Line 2:


{|class=wikitable
{|class=wikitable
!<source lang=apl inline>∧</source>!!<source lang=apl inline>0</source>!!<source lang=apl inline>1</source>
!<syntaxhighlight lang=apl inline>∧</syntaxhighlight>!!<syntaxhighlight lang=apl inline>0</syntaxhighlight>!!<syntaxhighlight lang=apl inline>1</syntaxhighlight>
|-
|-
!<source lang=apl inline>0</source>
!<syntaxhighlight lang=apl inline>0</syntaxhighlight>
|<source lang=apl inline>0</source>||<source lang=apl inline>0</source>
|<syntaxhighlight lang=apl inline>0</syntaxhighlight>||<syntaxhighlight lang=apl inline>0</syntaxhighlight>
|-
|-
!<source lang=apl inline>1</source>
!<syntaxhighlight lang=apl inline>1</syntaxhighlight>
|<source lang=apl inline>0</source>||<source lang=apl inline>1</source>
|<syntaxhighlight lang=apl inline>0</syntaxhighlight>||<syntaxhighlight lang=apl inline>1</syntaxhighlight>
|}
|}


Line 15: Line 15:
The following shows all possible combinations of inputs as a Boolean function.
The following shows all possible combinations of inputs as a Boolean function.


<source lang=apl>
<syntaxhighlight lang=apl>
       0 0 1 1 ∧ 0 1 0 1
       0 0 1 1 ∧ 0 1 0 1
0 0 0 1
0 0 0 1
</source>
</syntaxhighlight>


When combined with [[Reduce]], And can be used to test if every value in a Boolean vector is true.
When combined with [[Reduce]], And can be used to test if every value in a Boolean vector is true.


<source lang=apl>
<syntaxhighlight lang=apl>
       ∧/ 1 1 1 1 1
       ∧/ 1 1 1 1 1
1
1
       ∧/ 1 0 0 1 1
       ∧/ 1 0 0 1 1
0
0
</source>
</syntaxhighlight>
 
== See also ==
* [[Times]]
* [[Minimum]]
* [[Intersection]]
* [[Nand]]
* [[Or]]


== External links ==
== External links ==
Line 33: Line 40:
=== Documentation ===
=== Documentation ===


* [http://help.dyalog.com/17.1/#Language/Primitive%20Functions/And%20Lowest%20Common%20Multiple.htm Dyalog]
* [https://help.dyalog.com/17.1/#Language/Primitive%20Functions/And%20Lowest%20Common%20Multiple.htm Dyalog]
* [http://microapl.com/apl_help/ch_020_020_430.htm APLX]
* [http://microapl.com/apl_help/ch_020_020_430.htm APLX]
* J [https://www.jsoftware.com/help/dictionary/d111.htm Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/stardot#dyadic NuVoc]
* J [https://www.jsoftware.com/help/dictionary/d111.htm Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/stardot#dyadic NuVoc]
* [https://mlochbaum.github.io/BQN/doc/logic.html BQN]
{{APL built-ins}}[[Category:Primitive functions]][[Category:Scalar dyadic functions]]
{{APL built-ins}}[[Category:Primitive functions]][[Category:Scalar dyadic functions]]

Navigation menu