bit-and

clojure.core

  • (bit-and x y)
  • (bit-and x y & more)
Bitwise and

2 Examples top

  • user=> (bit-and 2r1100 2r1001)
    8
    ;; 8 = 2r1000
    
    ;; the same in decimal
    user=> (bit-and 12 9)
    8
  • user> (bit-and 0x08 0xFF)
    8
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:1228 top

(defn bit-and
  "Bitwise and"
   {:inline (nary-inline 'and)
    :inline-arities >1?
    :added "1.0"}
   ([x y] (. clojure.lang.Numbers and x y))
   ([x y & more]
      (reduce1 bit-and (bit-and x y) more)))
Vars in clojure.core/bit-and:
Used in 0 other vars

Comments top

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