function/macro | since v0.0-927 | clojure.core/bit-not | Edit |
(bit-not x)
Bitwise complement. Same as ~x
in JavaScript.
Bits can be entered using radix notation:
(bit-not 2r1100)
;;=> -13
Same numbers in decimal:
(bit-not 12)
;;=> -13
Bitwise complement
(defn bit-not
[x] (cljs.core/bit-not x))
(core/defmacro ^::ana/numeric bit-not [x]
(core/list 'js* "(~ ~{})" x))