countOneBits

Common
JVM
JS
Native
1.4

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

Common
JVM
JS
Native
1.4

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

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

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

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

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

Common
JVM
JS
Native
1.5
fun UInt.countOneBits(): Int
(source)

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

Common
JVM
JS
Native
1.5
fun ULong.countOneBits(): Int
(source)

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

Common
JVM
JS
Native
1.5
fun UByte.countOneBits(): Int
(source)

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

Common
JVM
JS
Native
1.5
fun UShort.countOneBits(): Int
(source)

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