Nor: Difference between revisions

From APL Wiki
Jump to navigation Jump to search
(Created page with "{{Built-in|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...")
 
No edit summary
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 the [[wikipedia:logical NOR|joint denial]] in Boolean logic. Nor is the [[not|boolean negation]] <source lang=apl inline>~</source> of the [[Or]] function <source lang=apl inline>∨</source>.
{{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 the [[wikipedia:logical NOR|joint denial]] in Boolean logic. Nor is the [[not|boolean negation]] <source lang=apl inline>~</source> of the [[Or]] function <source lang=apl inline>∨</source>. The [[glyph]] for Nor is composed from those of [[Not]] (<source lang=apl inline>~</source>) and [[Or]] (<source lang=apl inline>∧</source>), but [[fonts]] vary in how they compose them; some overlaying the glyphs (∨&#x334;), and some stacking them (∨&#x303;).


{|class=wikitable
{|class=wikitable

Revision as of 05:45, 2 June 2020

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 the joint denial in Boolean logic. Nor is the boolean negation ~ of the Or function . The glyph for Nor is composed from those of Not (~) and Or (), but 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

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