BITLSHIFT Function in Excel

In this post, you will learn about the BITLSHIFT function, the formula syntax, and the usage of the function in Microsoft Excel.

BITLSHIFT Function in Excel

The BITLSHIFT function in Excel shifts left by the specified amount of Shift in bits of a given number and return the decimal value of the number.

Syntax

BITLSHIFT(number, shift_amount)

Arguments:

  • Number    – The Number must be an integer and it should be greater than or equal to 0.
  • Shift_amount    – It should be an integer.
  • Version – Available on Excel 2013 version.

Note:

If the number of bit shifts resulting in an integer overflow ( larger than 2^48 -1), the function returns the #NUM! error.

Example

Take a look at the table below,

NumberShift_amountResult
13-16
13013
13126

Formula: BITLSHIFT (A1, B1)

Use this above formula while working in Excel worksheet. Enter the formula in the cell C1.

The number column is the number that you need to manipulate and the Shift_Left column is the number of digits that you need to left-shift the ‘Number’.

The result column is the actual result of the BITLSHIFT.

Now, let’s see what happens inside the process.

NumberShift_amountResult
00001101-100000110
00001101000001101
00001101100011010

The number 13 has the binary value ‘00001101’, and when we do a negative left shift to this binary value, the resultant would be “00000110” i.e, the left shift runs for the amount of time you declare in the shift_amount Column. It Shifts bits left for the number by adding zeros (0) to the right of the number represented in binary, and the resultant number is returned in decimal value.

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

In this article, you will learn about the SKEW.P function, the formula syntax and usage of the function in Microsoft...
In this article, you will learn about the SKEW function, the formula syntax and usage of the function in Microsoft...
In this article, you will learn about the RANK.EQ function, the formula syntax and usage of the function in Microsoft...
  • Excel
  • November 23, 2021