BitSh
Performs a bitwise shift-left or shift-right, no-rotation operation.
Method Signature
BitSh(number=[integer], count=[integer])
Arguments
Argument
Type
Required
Description
Default
number
integer
true
Numeric value to shift.
count
integer
true
Number of bits to shift (Integer in the range 0-31, inclusive).
Examples
Shift right by 1 bit
Uses the function bitShrn to perform a bitwise shift-right operation (no-rotation)
bitShrn( 5, 1 );
Result: 2
Additional Examples
writeOutput( bitSHRN( 128, 5 ) );
Related
Last updated
Was this helpful?