the BITLSHIFT function

Share on facebook
Share on twitter
Share on linkedin
Share on telegram
Share on whatsapp


Welcome back to our frequent blog of Excel functions from A to Z. Today we look at the BITLSHIFT function.

The BITLSHIFT function

It is time for another of the most used functions on the planet. If the planet is Uranus. This function returns a number shifted to the left by the specified number of bits. For those of us who have a social life, this means convert the number to binary first and then add a specific number of zeros before converting the new binary number back to a decimal number..

The BITLSHIFT The function uses the following syntax to operate:

BITLSHIFT (number, shift amount)

The BITLSHIFT The function has the following arguments:

  • number: This is required and must be an integer greater than or equal to 0
  • shift_amount: this is also necessary. The shift_amount must be an integer.

It should be noted at the same time that:

  • shifting a number to the left is equivalent to adding zeros (0) to the right of the binary representation of the number. As an example, a two-bit shift to the left in the decimal value 4 convert its binary value (100) in 10000, O 16 in decimal
  • if any of the arguments are outside your limitations, BITLSHIFT return the #ON ONE! error value
  • And number is greater than (2 ^ 48) -1, BITLSHIFT return the #ON ONE! error value
  • if the absolute value of shift_amount is greater than 53, BITLSHIFT return the #ON ONE! error value
  • if any of the arguments is a non-numeric value, BITLSHIFT return the #VALUE! error value
  • a negative number used as shift_amount The argument shifts the number of bits to the right.
  • a negative number used as shift_amount argument returns the same result as positive shift_amount argument for him BITRSHIFT function.

Please, see my example below:

Subscribe to our Newsletter

We will not send you SPAM mail. We hate it as much as you.