function/macrosince v0.0-927 clojure.core/bit-and-notEdit
(bit-and-not x y)
(bit-and-not x y & more)


Bitwise "and" x with bitwise "not" y. Same as x & ~y in JavaScript.


Bits can be entered using radix notation:

(bit-and-not 2r1100 2r1010)
;;=> 4
;; 4 = 2r0100

Same numbers in decimal:

(bit-and-not 12 10)
;;=> 4

Same result using bit-and and bit-not:

(bit-and 12 (bit-not 10))
;;=> 4

See Also:

Source docstring:
Bitwise and with complement
Function code @ clojurescript:src/main/cljs/cljs/core.cljs
(defn bit-and-not
  ([x y] (cljs.core/bit-and-not x y))
  ([x y & more]
     (reduce bit-and-not (cljs.core/bit-and-not x y) more)))

Macro code @ clojurescript:src/main/clojure/cljs/core.cljc
(core/defmacro ^::ana/numeric bit-and-not
  ([x y] (core/list 'js* "(~{} & ~~{})" x y))
  ([x y & more] `(bit-and-not (bit-and-not ~x ~y) ~@more)))