bit-xor

added
1.0

ns
clojure.core

type
function

(bit-xor x y) (bit-xor x y & more)

Bitwise exclusive or

                ;; set bits to 1 where bits of the arguments are different
user=> (bit-xor 2r1100 2r1001) 
5 
;; 5 = 2r0101


            
                ;; here is the truth table for XOR 
(Integer/toBinaryString (bit-xor 2r1100 2r1010) )
;;=> "110"
;; or 2r0110