- Advanced Excel Functions Tutorial
- Advanced Excel Functions - Home
- Compatibility Functions
- Advanced Excel Functions - Cube
- Database Functions
- Date & Time Functions
- Engineering Functions
- Financial Functions
- Information Functions
- Advanced Excel Functions - Logical
- Lookup & Reference Functions
- Math & Trignometric Functions
- Statistical Functions
- Useful Resources
- Quick Guide
- Useful Resources
- Discussion
Engineering - BITLSHIFT Function
Description
The BITLSHIFT function returns a number shifted left by the specified number of bits.
Syntax
BITLSHIFT (number, shift_amount)
Arguments
Argument | Description | Required/ Optional |
---|---|---|
number | Number must be an integer greater than or equal to 0. | Required |
shift_amount | Shift_amount must be an integer. | Required |
Notes
Shifting a number left is equivalent to adding zeros (0) to the right of the binary representation of the number. For example, a 2-bit shift to the left on the decimal value 4 converts its binary value (100) to 10000, or 16 in decimal.
If either argument is outside their constraints, BITLSHIFT returns the #NUM! Error value.
If Number is greater than (2^48)-1, BITLSHIFT returns the #NUM! Error value.
If the absolute value of Shift_amount is greater than 53, BITLSHIFT returns the #NUM! Error value.
If either argument is a non-numeric value, BITLSHIFT returns the #VALUE! Error value.
A negative number used as the Shift_amount argument shifts the number of bits to the right.
A negative number used as the Shift_amount argument returns the same result as a positive shift_amount argument for the BITRSHIFT function.
Applicability
Excel 2013, Excel 2016