clojure.core/bit-shift-right¶
Bitwise shift right
Examples¶
Note by TimMc¶
From the IRC channel, a way to get zero-fill bit-shift-right:
06:08 < mikera> (defn >>> [v bits] (bit-shift-right (bit-and 0xFFFFFFFF v) bits))
There's also an open ticket for a built-in version.
Note by jafingerhut¶
unsigned-bit-shift-right was added in Clojure 1.6.0. Click the link in the See Also section above.
See also¶
- clojure.core/bit-shift-left (2)
- clojure.core/bit-xor (2)
- clojure.core/bit-or (2)
- clojure.core/bit-and (4)
- clojure.core/bit-set (2)
- clojure.core/bit-test (3)
- clojure.core/bit-flip
- clojure.core/bit-and-not (3)
- clojure.core/bit-clear
- clojure.core/unsigned-bit-shift-right (3)
Content from the matching ClojureDocs page, with authors credited on each contribution.