;; set bits to 1 where bits of the arguments are different user=> (bit-xor 2r1100 2r1001) 5 ;; 5 = 2r0101
(defn bit-xor "Bitwise exclusive or" {:inline (nary-inline 'xor) :inline-arities >1? :added "1.0"} ([x y] (. clojure.lang.Numbers xor x y)) ([x y & more] (reduce1 bit-xor (bit-xor x y) more)))
Comments top
No comments for bit-xor. Log in to add a comment.