bit-clear

clojure.core

  • (bit-clear x n)
Clear bit at index n

1 Example top

  • user=> (bit-clear 2r1011 3) ; index is 0-based
    3 
    ;; 3 = 2r0011
    
    ;; the same in decimal
    user=> (bit-clear 11 3) 
    3
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:1266 top

(defn bit-clear
  "Clear bit at index n"
  {:added "1.0"
   :static true}
  [x n] (. clojure.lang.Numbers clearBit x n))
Vars in clojure.core/bit-clear:
Used in 0 other vars

Comments top

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