JS Built-ins
BigIntasUintNintermediate

BigInt.asUintN() β€” 4-bit wrap

πŸ“– Usage Example
BigInt.asUintN(4, 16n)  // β†’ 0n

16n exceeds 4-bit unsigned range (0-15) so it wraps to 0.

BigInt.asUintN() 4-bit

BigInt.asUintN(4, 16n) wraps to 0n because 16 equals 2^4.

Challenge: Verify this wrap.

πŸ’‘ Hints (1)
  • β€’ Unsigned 4-bit range is 0..15; 16 wraps to 0.