Returns a number shifted left by the specified number of bits.
Sample Usage
BITLSHIFT(5,2)
BITLSHIFT(C5,C6)
Syntax
BITLSHIFT(number,shiftby)
- number - The number to be shifted.
- shiftby - The number of places to shift.
Examples
BITLSHIFT(5,2) returns a value of 20.
BITLSHIFT(C5,C6) shifts C6 bits left for the number contained in C5 by adding zeros (0) to the right of the number represented in binary. The resultant number is then converted back to decimal.
Notes
- The number must be non-negative.
- shiftby must be a number from -53 to 53., inclusive
- A negative shiftby value is effectively a BITRSHIFT function.
- Values don't necessarily have to be numbers.
- Values may be coerced. For example, a string value of "3" can be coerced to be simply 3, and a Boolean value of TRUE can be coerced to 1.