How to Use the BITRSHIFT Function in Excel

Welcome to the comprehensive guide on using the BITRSHIFT function in Microsoft Excel and Google Sheets, a tool designed for performing bitwise right shift operations on the binary forms of numbers. In this guide, you’ll learn about the function’s mechanics, its syntax, practical applications, and how to efficiently implement it in your tasks.

Function Syntax

The syntax for the BITRSHIFT function is consistent across both Excel and Google Sheets and is outlined below:

=BITRSHIFT(number, shift_amount)
  • number: This argument is the number, or a reference to the cell containing the number, that you want to shift.
  • shift_amount: This specifies the number of bits by which you want to shift the binary representation of number rightward.

Examples

Example 1: Using BITRSHIFT for Right Shifting

Consider you have a binary number 1010, which equals 10 in decimal. To right shift this number by 1 bit using the BITRSHIFT function, the scenario and outcome would look like the following:

Formula Result
=BITRSHIFT(10,1) 5 (0101 in binary)

Example 2: Applying BITRSHIFT to Cell References

The BITRSHIFT function can also interact with cell references. If cell A1 contains the decimal number 6 (0110 in binary), and you wish to shift it right by 2 bits, you would use this formula:

Formula Result
=BITRSHIFT(A1,2) 1 (0001 in binary)

Example 3: Combining BITRSHIFT with Other Functions

Furthermore, BITRSHIFT can be paired with other functions for more elaborate operations. If cell A1 contains the number 15 (1111 in binary), and you need to perform a right shift by 2 bits before conducting a bitwise AND operation with 3 (0011 in binary), your formula would look as follows:

Formula Result
=BITAND(BITRSHIFT(A1,2),3) 1 (0001 in binary)

These examples illustrate the flexibility and utility of the BITRSHIFT function in adapting binary numbers through right shifting operations. By experimenting with different scenarios and combinations, you can explore the full range of functionalities this function offers in Excel and Google Sheets.

More information: https://support.microsoft.com/en-us/office/bitrshift-function-274d6996-f42c-4743-abdb-4ff95351222c

Other functions
Returns the modified Bessel function In(x)
Returns the Bessel function Jn(x)
Returns the modified Bessel function Kn(x)
Returns the Bessel function Yn(x)
Converts a binary number to decimal
Converts a binary number to hexadecimal
Converts a binary number to octal
Returns a 'Bitwise And' of two numbers
Returns a value number shifted left by shift_amount bits
Returns a bitwise OR of 2 numbers
Returns a bitwise 'Exclusive Or' of two numbers
Converts real and imaginary coefficients into a complex number
Converts a number from one measurement system to another
Converts a decimal number to binary
Converts a decimal number to hexadecimal
Converts a decimal number to octal
Tests whether two values are equal
Returns the error function
Returns the error function
Returns the complementary error function
Returns the complementary ERF function integrated between x and infinity
Tests whether a number is greater than a threshold value
Converts a hexadecimal number to binary
Converts a hexadecimal number to decimal
Converts a hexadecimal number to octal
Returns the absolute value (modulus) of a complex number
Returns the imaginary coefficient of a complex number
Returns the argument theta, an angle expressed in radians
Returns the complex conjugate of a complex number
Returns the cosine of a complex number
Returns the hyperbolic cosine of a complex number
Returns the cotangent of a complex number
Returns the cosecant of a complex number
Returns the hyperbolic cosecant of a complex number
Returns the quotient of two complex numbers
Returns the exponential of a complex number
Returns the natural logarithm of a complex number
Returns the base-10 logarithm of a complex number
Returns the base-2 logarithm of a complex number
Returns a complex number raised to an integer power
Returns the product of complex numbers
Returns the real coefficient of a complex number
Returns the secant of a complex number
Returns the hyperbolic secant of a complex number
Returns the sine of a complex number
Returns the hyperbolic sine of a complex number
Returns the square root of a complex number
Returns the difference between two complex numbers
Returns the sum of complex numbers
Returns the tangent of a complex number
Converts an octal number to binary
Converts an octal number to decimal
Converts an octal number to hexadecimal