RosettaCodeData/Task/Four-bit-adder/J/four-bit-adder-1.j

7 lines
125 B
Text
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
and=: *.
or=: +.
not=: -.
xor=: (and not) or (and not)~
hadd=: and ,"0 xor
add=: ((({.,0:)@[ or {:@[ hadd {.@]), }.@])/@hadd