You're viewing version 1.2.0 of bit-xor. The latest stable version of Clojure Core is 1.3.0.
1.2.0 Arrow_down_16x16



  • (bit-xor x y)
Bitwise exclusive or

1 Example top

  • ;; set bits to 1 where bits of the arguments are different
    user=> (bit-xor 2r1100 2r1001) 
    ;; 5 = 2r0101
Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:1043 top

(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))
Vars in clojure.core/bit-xor: defn
Used in 0 other vars

Comments top

No comments for bit-xor. Log in to add a comment.