Bit manipulation functions.
Note that for bitwise AND, OR, XOR of integer values etc you can use
the java bitwise operators
"&", "|", "^".
hasBit( value, bitIndex )
value (long integer): integer whose bits are to be testedbitIndex (integer): index of bit to be tested in range 0..63,
where 0 is the least significant bit(value & 1L<<bitIndex) != 0
hasBit(64, 6) = true
hasBit(63, 6) = false
bitCount( i )
i (long integer): integer valuei
bitCount(64) = 1
bitCount(3) = 2
toBinary( value )
value (long integer): integer valuevalue
toBinary(42) = "101010"
toBinary(255^7) = "11111000"
fromBinary( binVal )
binVal (String): binary representation of valuebinVal
fromBinary("101010") = 42