Four bit adder: Difference between revisions

→‎{{header|APL}}: use built-in NAND operator ⍲ instead of defining a new one.
(→‎{{header|APL}}: use built-in NAND operator ⍲ instead of defining a new one.)
 
Line 517:
and ← { ⍺ ∧ ⍵ }
or ← { ⍺ ∨ ⍵ }
nand ← { ⍺ ⍲ ⍵ }
 
⍝ Build the complex gates
nand ← { not ⍺ and ⍵ } ⍝ similarly this can be built with composition as "nand ← not and"
xor ← { (⍺ and not ⍵) or (⍵ and not ⍺) }
 
1,480

edits