<< Go back to all functions

BITRSHIFT

The BITRSHIFT function in Google Sheets is used to shift the bits of the input a certain number of places to the right. This function is helpful when you need to perform bitwise operations on numbers. Learn more about this function and its application in our comprehensive guide.

Function Syntax and Parameters

Syntax: BITRSHIFT(value, shift_amount)

Parameters:

  • value: The number or cell reference containing the value to be shifted.
  • shift_amount: The number or cell reference containing the amount by which the bits should be shifted to the right.

Step-by-Step Tutorial

  1. Using BITRSHIFT with individual numbers:

    • Example: =BITRSHIFT(10, 2)
    • Result: 2 (10 in binary is 1010, right shifting it by 2 places results in 10, which is 2 in decimal).
  2. Using BITRSHIFT with cell references:

    • Example: If cell A1 contains 10 and cell B1 contains 2, then =BITRSHIFT(A1, B1) will return 2.

Use Cases and Scenarios

  1. Binary Operations: Perform bitwise operations on binary numbers.
  2. Data Encryption: Create custom encryption algorithms that involve shifting bits.
  3. Data Compression: Use bitwise shifting to compress data efficiently.

Related Function

  • BITLSHIFT: Shifts the bits of the input a certain number of places to the left.

Related Article