Anonymous user
Four bit adder: Difference between revisions
→{{header|Haskell}}: replace adder function with one with 4 visible fulladders
m (J: clarify wording) |
(→{{header|Haskell}}: replace adder function with one with 4 visible fulladders) |
||
Line 724:
xor a b = uncurry nand. (nand a &&& nand b) $ nand a b</lang>
Adder circuits:
<lang haskell>halfAdder =
fullAdder (c, a, b) = (\(cy,s) -> first (bor cy) $ halfAdder (b, s)) $ halfAdder (c, a)
Example using add
|