Nand: Difference between revisions

From APL Wiki
Jump to navigation Jump to search
No edit summary
m (Text replacement - "http://help.dyalog.com" to "https://help.dyalog.com")
Tags: Mobile edit Mobile web edit
Line 24: Line 24:
=== Documentation ===
=== Documentation ===


* [http://help.dyalog.com/latest/#Language/Primitive%20Functions/Nand.htm Dyalog]
* [https://help.dyalog.com/latest/#Language/Primitive%20Functions/Nand.htm Dyalog]
* [http://microapl.com/apl_help/ch_020_020_450.htm APLX]
* [http://microapl.com/apl_help/ch_020_020_450.htm APLX]
* J [https://www.jsoftware.com/help/dictionary/d112.htm Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/starco#dyadic NuVoc]
* J [https://www.jsoftware.com/help/dictionary/d112.htm Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/starco#dyadic NuVoc]
{{APL built-ins}}[[Category:Primitive functions]][[Category:Scalar dyadic functions]]
{{APL built-ins}}[[Category:Primitive functions]][[Category:Scalar dyadic functions]]

Revision as of 14:32, 14 July 2020

Nand () is a dyadic 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 Sheffer stroke or alternative denial in Boolean logic. Nand is the boolean negation ~ of the And 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 1
1 1 0

Examples

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

      0 0 1 1 ⍲ 0 1 0 1
1 1 1 0

External links

Documentation

APL built-ins [edit]
Primitives (Timeline) Functions
Scalar
Monadic ConjugateNegateSignumReciprocalMagnitudeExponentialNatural LogarithmFloorCeilingFactorialNotPi TimesRollTypeImaginarySquare RootRound
Dyadic AddSubtractTimesDivideResiduePowerLogarithmMinimumMaximumBinomialComparison functionsBoolean functions (And, Or, Nand, Nor) ∙ GCDLCMCircularComplexRoot
Non-Scalar
Structural ShapeReshapeTallyDepthRavelEnlistTableCatenateReverseRotateTransposeRazeMixSplitEncloseNestCut (K)PairLinkPartitioned EnclosePartition
Selection FirstPickTakeDropUniqueIdentityStopSelectReplicateExpandSet functions (IntersectionUnionWithout) ∙ Bracket indexingIndexCartesian ProductSort
Selector Index generatorGradeIndex OfInterval IndexIndicesDealPrefix and suffix vectors
Computational MatchNot MatchMembershipFindNub SieveEncodeDecodeMatrix InverseMatrix DivideFormatExecuteMaterialiseRange
Operators Monadic EachCommuteConstantReplicateExpandReduceWindowed ReduceScanOuter ProductKeyI-BeamSpawnFunction axisIdentity (Null, Ident)
Dyadic BindCompositions (Compose, Reverse Compose, Beside, Withe, Atop, Over) ∙ Inner ProductDeterminantPowerAtUnderRankDepthVariantStencilCutDirect definition (operator)Identity (Lev, Dex)
Quad names Index originComparison toleranceMigration levelAtomic vector