In this article, we will learn about how to use the BITLSHIFT function in Excel.
BITLSHIFT function in excel perform the Bitwise Left Shift operation on a decimal number and returns the decimal number after the operation performed.
Bitwise left shift operation is performed on a binary number. Let’s consider a decimal number 4 and bit left shift to be 2. As we know 4 is represented as 100 in binary. So 2 zeros will be added to the right of the binary number by shifting left.
|Number||Binary number||shift_amount||Binary number after shift||Number after shift|
The BITLSHIFT function returns a Bitwise Left Shift of a decimal number upto shift_amount.
number1 : a positive integer number of base 10 (decimal number) to be shifted
shift_amount : an integer representing the amount of shift to occur on the number. This argument can be positive , zero or negative.
Here is the excel representation of the function
As you can the function returns 16 after the bitwise left shift of 2 on 4.
You can use the DEC2BIN & BIN2DEC function in excel to understand the conversion operation.
Now let’s get more understanding of the function via using them in some examples.
Here we have some values as number & shift_amount in Columns. We need to get the bitwise left shift operation on the given numbers using the BITLSHIFT function in excel
Use the formula :
A2 : number provided to the function as cell reference
B2 : number provided to the function as cell reference
The bitwise left shift operation on 1 ( 01 ) by adding one zero to the right of the number will be 2 ( 010 ).
Now copy the formula to other cells using the Ctrl + D shortcut key.
As you can see here the BITLSHIFT function returns the result of the input values.
Hope you understood how to use BITLSHIFT function and referring cell in Excel. Explore more articles on Excel mathematical conversion functions here. Please feel free to state your query or feedback for the above article.
How to use the ISEVEN function in Excel
How to Use ISERROR Function in Excel
How to Use ISNUMBER Function in Excel
How to use the ISNA Function
How to use the ISTEXT Function in Excel
How to use the ISODD Function in Excel
Edit a dropdown list
Absolute reference in Excel
If with conditional formatting
If with wildcards
Vlookup by date
The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.