countOneBits

Common
JVM
JS
Native
1.4
@ExperimentalUnsignedTypes fun UInt.countOneBits(): Int

Counts the number of set bits in the binary representation of this UInt number.

Common
JVM
JS
Native
1.4
@ExperimentalUnsignedTypes fun ULong.countOneBits(): Int

Counts the number of set bits in the binary representation of this ULong number.

Common
JVM
JS
Native
1.4
@ExperimentalUnsignedTypes fun UByte.countOneBits(): Int

Counts the number of set bits in the binary representation of this UByte number.

Common
JVM
JS
Native
1.4
@ExperimentalUnsignedTypes fun UShort.countOneBits(): Int

Counts the number of set bits in the binary representation of this UShort number.

Common
JVM
JS
Native
1.4
fun Int.countOneBits(): Int

Counts the number of set bits in the binary representation of this Int number.

Common
JVM
JS
Native
1.4
fun Long.countOneBits(): Int

Counts the number of set bits in the binary representation of this Long number.

Common
JVM
JS
Native
1.4
fun Byte.countOneBits(): Int

Counts the number of set bits in the binary representation of this Byte number.

Common
JVM
JS
Native
1.4
fun Short.countOneBits(): Int

Counts the number of set bits in the binary representation of this Short number.