Module bits



bits:length(x)
Returns the minimum number of bits required to represent x; the result is 0 for x == 0.

bits:popcount(x)
Returns the number of one bits ("population count") in x.