countBitsSet

private fnuint countBitsSet(T)(const T value) if (isIntegral!T)

Counts the number of set bits in the binary representation of value. For signed integers, the sign bit is included in the count.