BITRSHIFT

Formulas / BITRSHIFT
Shift numbers by bits.
=BITRSHIFT(number,shift_amount)
  • number - an integer greater than or equal to 0
  • shift_amount - an integer

Examples

  • =BITRSHIFT(13,2)

    The BITRSHIFT function is a useful tool in Sourcetable which allows users to bitwise shift the bits of an integer to the right by a given number of places. For example, this formula shifts 13 right by two bits and returns 11.

  • =BITRSHIFT(15,4)

    The BITRSHIFT function is used to perform a bitwise shift on a given integer. For instance, this formula shifts 15 right by four bits and returns 0.

  • =BITRSHIFT(7,3)

    The BITRSHIFT function can take two arguments, an integer and a number of places to shift. For example, running the formula above shifts 7 right by three bits and returns 0.

  • =BITRSHIFT(255,4)

    The BITRSHIFT function can be used to shift the bits of an integer to the right by a given number of places. For example,this formula shifts 255 right by four bits and returns 15.

  • =BITRSHIFT(20,3)

    The BITRSHIFT function is a useful Sourcetable tool which allows users to bitwise shift the bits of an integer to the right by a given number of places. For instance, the formula above shifts 20 right by three bits and returns 2.


Summary

The BITRSHIFT function is used to shift a numeric value right, by removing digits from the rightmost side of the binary representation. It throws an error in the case of an invalid argument, or when the absolute value of the shift_amount argument is greater than 53.

  • The BITRSHIFT function shifts a number by the specified number of bits, effectively halving or doubling it several times.
  • The BITRSHIFT function returns a decimal number, and requires two arguments: number and shift_amount.

Frequently Asked Questions

What is the BITRSHIFT function?
The BITRSHIFT function shifts numbers right by removing digits from the rightmost side of the number's binary representation.
Can a negative number be used as the shift amount?
Yes, a negative number can be used as the shift amount to shift bits to the left.
What does the shift amount in the BITRSHIFT function do?
The shift amount in the BITRSHIFT function controls how many bits are shifted.
What errors can be thrown by the BITRSHIFT function?
  • The BITRSHIFT function throws a #VALUE! error if either argument is not a number.
  • The BITRSHIFT function returns a #NUM! error if either argument is outside of its constraints.
Sourcetable Logo

Work smarter

Al is here to help. Leverage the latest models to
analyze spreadsheets, enrich data, and create reports.

Drop CSV