trailingZeroBitCount property

  1. @Since.new("3.13")
int get trailingZeroBitCount

The number of trailing (least significant) zero bits in the binary representation of this integer.

On JavaScript platforms, only the least significant 32 bits are used. On native platforms, the 64-bit signed integer is used directly.

The trailing zero-bit count is the position of the least significant 1-bit in the binary representation of the integer. If the integer is zero, the value is the size of integer that the platform uses for bit operations (64-bit on native, 32-bit on the web).

1.trailingZeroBitCount;  // 0
2.trailingZeroBitCount;  // 1
8.trailingZeroBitCount;  // 3
0.trailingZeroBitCount;  // 64 on native, 32 on the web

Implementation

@Since("3.13")
int get trailingZeroBitCount;