_<<_keeping_bits

Definitions:

whole number, integer, whole number
Source: /avail/Avail/Foundation/Bootstrap/Fallible Primitives
Categories: Primitives, Numbers, Integers, Mathematics, Bits
Shift baseInteger to the left by shiftFactor bits (treating a negative factor as a right shift), then truncate the result to the bottom truncationBits bits by zeroing the rest.
Position Name Type Description
Parameters
1 baseInteger whole number A non-negative integer to shift and mask.
2 shiftFactor integer How many bit positions to shift left by (negative for a right shift).
3 truncationBits whole number The number of low-order bits to preserve after the shift (must be ≥ 0).
Returns [0..∞) ⎣_<<_keeping_bits × 2baseInteger⎦ mod 2shiftFactor
Raises
shift-and-truncate-requires-non-negative exception
too-large-to-represent exception

Semantic restrictions:

whole number's type, integer's type, whole number's type
Source: /avail/Avail/Foundation/Math
Strengthen the result type of bounded bitshift, primarily based on the truncation bit count.

Given a positive integer B, a shift factor S, and a truncation bit count T, shift B to the left by S bits (treating a negative factor as a right shift), then truncate the result to the bottom T bits by zeroing the rest.

Type Description
Parameter Types
whole number's type
integer's type
whole number's type