Syntax
| Parameter | Description |
|---|---|
| number | Parameter of the BITLSHIFT function. |
| shift_amount | Parameter of the BITLSHIFT function. |
Examples
Shift left by 2
=BITLSHIFT(4, 2)
Multiply by 8 using shifts
=BITLSHIFT(5, 3)
Create a bit mask
=BITLSHIFT(1, 7)
Common Errors
The number is negative, the shift amount exceeds 53, or the result exceeds 2^48 - 1.
An argument is non-numeric.
Tips
BITLSHIFT(n, k) is equivalent to n * 2^k. This is faster in computing but equivalent in a spreadsheet — use whichever is clearer.
BITLSHIFT(1, N) creates a mask with only bit N set. Use this with BITAND to test specific bits, or BITOR to set them.
If the shift pushes bits beyond the 48-bit limit, you'll get a #NUM! error. Check that your number * 2^shift stays within range.
Try BITLSHIFT in Viztab
Import your data and use BITLSHIFT with 370+ other formulas. No signup required.
Open Viztab