Four bit adder: Difference between revisions
→{{header|APL}}: use built-in NAND operator ⍲ instead of defining a new one.
(Added Easylang) |
(→{{header|APL}}: use built-in NAND operator ⍲ instead of defining a new one.) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 517:
and ← { ⍺ ∧ ⍵ }
or ← { ⍺ ∨ ⍵ }
nand ← { ⍺ ⍲ ⍵ }
⍝ Build the complex gates
xor ← { (⍺ and not ⍵) or (⍵ and not ⍺) }
Line 2,814:
[[File:Fōrmulæ - Four bit adder 06.png]]
<span> :</span>
[[File:Fōrmulæ - Four bit adder 07.png]]
Line 7,110 ⟶ 7,112:
=={{header|Wren}}==
{{trans|Go}}
<syntaxhighlight lang="
var ha = Fn.new { |a, b| [xor.call(a, b), a & b] }
|