Skip to main content

Module bits

Module bits 

Source
Expand description

The 48-bit operations of BITAND, BITOR, BITXOR, BITLSHIFT and BITRSHIFT. Operands are below 2⁴⁸ (the engine checks that) and shifts are at most 53 places.

Constants§

LIMIT
2⁴⁸, the bit functions’ exclusive operand bound.

Functions§

and
a & b: below 2⁴⁸ and at most either operand.
or
a | b: below 2⁴⁸ and at least either operand.
shl
x · 2ⁿ, exactly: below 2¹⁰¹, so it never overflows the u128.
shr
x / 2ⁿ (rounded down): at most x.
xor
a ^ b: below 2⁴⁸.