node-lib

@wtasnorg/node-lib


@wtasnorg/node-lib / countZeroesWithWidth

Function: countZeroesWithWidth()

countZeroesWithWidth(value, width): number

Defined in: bits.ts:94

Count zero bits within a fixed width, considering only low-order width bits.

Parameters

value

Input value.

number bigint

width

number

Bit width to inspect.

Returns

number

Number of zero bits in the selected width.

Throws

If value is negative/unsafe or width is negative/unsafe.