Nor: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (Text replacement - "</source>" to "</syntaxhighlight>") |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Built-in|Nor|⍱}} is a [[dyadic]] [[scalar function|scalar]] [[boolean function]] which tests if neither argument is true: it returns 1 if both are 0 and 0 if at least one is 1. It represents Peirce's arrow or [[wikipedia:logical NOR|joint denial]] in Boolean logic. Nor is the [[not|boolean negation]] < | {{Built-in|Nor|⍱}} is a [[dyadic]] [[scalar function|scalar]] [[boolean function]] which tests if neither argument is true: it returns 1 if both are 0 and 0 if at least one is 1. It represents Peirce's arrow or [[wikipedia:logical NOR|joint denial]] in Boolean logic. Nor is the [[not|boolean negation]] <syntaxhighlight lang=apl inline>~</syntaxhighlight> of the [[Or]] function <syntaxhighlight lang=apl inline>∨</syntaxhighlight>, and so its [[glyph]] is composed from those. However, [[fonts]] vary in how they compose them; some overlaying the glyphs (∨̴), and some stacking them (∨̃). | ||
{|class=wikitable | {|class=wikitable | ||
!< | !<syntaxhighlight lang=apl inline>⍱</syntaxhighlight>!!<syntaxhighlight lang=apl inline>0</syntaxhighlight>!!<syntaxhighlight lang=apl inline>1</syntaxhighlight> | ||
|- | |- | ||
!< | !<syntaxhighlight lang=apl inline>0</syntaxhighlight> | ||
|< | |<syntaxhighlight lang=apl inline>1</syntaxhighlight>||<syntaxhighlight lang=apl inline>0</syntaxhighlight> | ||
|- | |- | ||
!< | !<syntaxhighlight lang=apl inline>1</syntaxhighlight> | ||
|< | |<syntaxhighlight lang=apl inline>0</syntaxhighlight>||<syntaxhighlight lang=apl inline>0</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. | ||
< | <syntaxhighlight lang=apl> | ||
0 0 1 1 ⍱ 0 1 0 1 | 0 0 1 1 ⍱ 0 1 0 1 | ||
1 0 0 0 | 1 0 0 0 | ||
</ | </syntaxhighlight> | ||
== External links == | == External links == | ||
Line 24: | Line 24: | ||
=== Documentation === | === Documentation === | ||
* [ | * [https://help.dyalog.com/latest/#Language/Primitive%20Functions/Nor.htm Dyalog] | ||
* [http://microapl.com/apl_help/ch_020_020_440.htm APLX] | * [http://microapl.com/apl_help/ch_020_020_440.htm APLX] | ||
* J [https://www.jsoftware.com/help/dictionary/d102.htm Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/plusco#dyadic NuVoc] | * J [https://www.jsoftware.com/help/dictionary/d102.htm Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/plusco#dyadic NuVoc] | ||
{{APL built-ins}}[[Category:Primitive functions]][[Category:Scalar dyadic functions]] | {{APL built-ins}}[[Category:Primitive functions]][[Category:Scalar dyadic functions]] |
Latest revision as of 22:15, 10 September 2022
⍱
|
Nor (⍱
) is a dyadic scalar boolean function which tests if neither argument is true: it returns 1 if both are 0 and 0 if at least one is 1. It represents Peirce's arrow or joint denial in Boolean logic. Nor is the boolean negation ~
of the Or function ∨
, and so its glyph is composed from those. However, fonts vary in how they compose them; some overlaying the glyphs (∨̴), and some stacking them (∨̃).
⍱ |
0 |
1
|
---|---|---|
0
|
1 |
0
|
1
|
0 |
0
|
Examples
The following shows all possible combinations of inputs as a Boolean function.
0 0 1 1 ⍱ 0 1 0 1 1 0 0 0