JS Built-ins
BigIntasIntNintermediate

BigInt.asIntN() β€” 4-bit overflow

πŸ“– Usage Example
BigInt.asIntN(8, 128n)  // β†’ -128n

Values that overflow wrap around like signed integer overflow.

BigInt.asIntN() 4-bit

BigInt.asIntN(4, 8n) wraps to -8n in a signed 4-bit context.

Challenge: Verify the 4-bit overflow.

πŸ’‘ Hints (1)
  • β€’ Signed 4-bit range is -8..7.