BITLSHIFT( )
Topic group Related topics Example
Shifts a number's bits to the left.
Syntax
BITLSHIFT(<int expN>, <shift expN>)
<int expN>
A 32-bit integer.
<shift expN>
The number of places to shift, from 0 to 32.
Description
BITLSHIFT( ) moves each bit in the numeric value <int expN> to the left the number of times you specify in <shift expN>. Each time the bits are shifted, the least significant bit (bit 0, the bit farthest to the right) is set to 0, and the most significant bit (bit 31, the bit farthest to the left) is lost.
Shifting a number’s bits to the left once has the effect of multiplying the number by two, except that if the number gets too large—equal to or greater than 2^32 (roughly 4 billion)—the high bit is lost.