BigInt.asUintN

Returns a new BigInt extracting the low bits of the given BigInt and interpreting them as an unsigned integer, discarding higher bits.

Syntax

BigInt.asUintN(bits, int)

Parameters

Return value

An unsigned value of BigInt modulo 2**bits.

Examples

BigInt.asUintN(3, 0b11110n).toString(2)
110

See also