Nand: Difference between revisions

Jump to navigation Jump to search
108 bytes added ,  22:27, 10 September 2022
m
Text replacement - "</source>" to "</syntaxhighlight>"
m (Text replacement - "<source" to "<syntaxhighlight")
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
Line 1: Line 1:
{{Built-in|Nand|⍲}} is a [[dyadic]] [[scalar function|scalar]] [[boolean function]] which tests if either argument is not true: it returns 0 if both are 1 and 1 if at least one is 0. It represents the [[wikipedia:Sheffer stroke|Sheffer stroke]] or alternative denial in Boolean logic. Nand is the [[not|boolean negation]] <syntaxhighlight lang=apl inline>~</source> of the [[And]] function <syntaxhighlight lang=apl inline>∧</source>, and so its [[glyph]] is composed from those. However, [[fonts]] vary in how they compose them; some overlaying the glyphs (∧&#x334;), and some stacking them (∧&#x303;).
{{Built-in|Nand|⍲}} is a [[dyadic]] [[scalar function|scalar]] [[boolean function]] which tests if either argument is not true: it returns 0 if both are 1 and 1 if at least one is 0. It represents the [[wikipedia:Sheffer stroke|Sheffer stroke]] or alternative denial in Boolean logic. Nand is the [[not|boolean negation]] <syntaxhighlight lang=apl inline>~</syntaxhighlight> of the [[And]] 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 (∧&#x334;), and some stacking them (∧&#x303;).


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


Line 18: Line 18:
       0 0 1 1 ⍲ 0 1 0 1
       0 0 1 1 ⍲ 0 1 0 1
1 1 1 0
1 1 1 0
</source>
</syntaxhighlight>


== External links ==
== External links ==

Navigation menu