oboy/src/bit.ml
Fabien Freling 644a1356a8 Add LCD control structure.
Also add the Bin module to easily deal with binary.
2015-04-08 14:49:24 +02:00

4 lines
101 B
OCaml

let is_set num i =
if i < 0 then failwith "Invalid bit index."
(num lsr i) land 0b00000001 <> 0