Vocabularymath.bitwiseInputsOutputsWord descriptionKeep only
n bits from the integer
m. For negative numbers, represent the number as two's complement (a positive integer representing a negative integer).
ExamplesUSING: math.bitwise prettyprint ;
0x123abcdef 16 bits .h
0xcdef
USING: math.bitwise prettyprint ;
-2 16 bits .h
0xfffe
See also>signedDefinition