;; 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 (fn [x y] `(. clojure.lang.Numbers (xor ~x ~y))) :added "1.0"} [x y] (. clojure.lang.Numbers xor x y))
Comments top
No comments for bit-xor. Log in to add a comment.