package rfsm

  1. Overview
  2. Docs

Module Rfsm.IntbitsSource

Bit level operations on ints

Sourceexception Invalid_range of int * int
Sourceval get_bits : int -> int -> int -> int

get_bits hi lo n returns the value represented by the bit range hi..lo in n.

Sourceval set_bits : int -> int -> int -> int -> int

set_bits hi lo n v returns the value obtained by setting by the bit range hi..lo in n to v.

Sourceval bit_size : int -> int

bit_size n returns the minimum number of bits required to represent n

Sourceval to_string : int -> int -> string

to_string s n returns binary representation, as a string of length s of integer n

OCaml

Innovation. Community. Security.