Skip to content
Adam Bliss edited this page Oct 25, 2013 · 1 revision

Implementation

++  mix                                                 ::  binary xor
  ~/  %mix
  |=  [a=@ b=@]
  ^-  @
  =+  [c=0 d=0]
  |-
  ?:  ?&(=(0 a) =(0 b))
    d
  %=  $
    a   (rsh 0 1 a)
    b   (rsh 0 1 b)
    c   +(c)
    d   (add d (lsh 0 c =((end 0 1 a) (end 0 1 b))))
  ==

Comments



Parts of this document are generated automatically. Edits within the comments section will be preserved.

Clone this wiki locally