What is BITRSHIFT function in Excel?
BITRSHIFT function is one of Engineering functions in Microsoft Excel that returns a number shifted right by the specified number of bits.
Syntax of BITRSHIFT function
The BITRSHIFT function syntax has the following arguments.
- Number: Must be an integer greater than or equal to 0.
- Shift_amount: Must be an integer.
BITRSHIFT formula explanation
- Shifting a number right is equivalent to removing digits from the rightmost side of the binary representation of the number. For example, a 2-bit shift to the right on the decimal value 13 converts its binary value (1101) to 11, or 3 in decimal.
- If either argument is outside its constraints, BITRSHIFT returns the #NUM! error value.
- If Number is greater than (2^48)-1, BITRSHIFT returns the #NUM! error value.
- If the absolute value of Shift_amount is greater than 53, BITRSHIFT returns the #NUM! error value.
- If either argument is a non-numeric value, BITRSHIFT returns the #VALUE! error value.
- A negative number used as the Shift_amount argument shifts the number of bits to the left.
- A negative number used as the Shift_amount argument returns the same result as a positive Shift_amount argument for the BITLSHIFT function.
Example of BITRSHIFT function
Steps to follow:
1. Open a new Excel worksheet.
2. Copy data in the following table below and paste it in cell A1
Note: For formulas to show results, select them, press F2 key on your keyboard and then press Enter.
You can adjust the column widths to see all the data, if need be.
|Formula||Description||Result||How it works|
|=BITRSHIFT(13,2)||Shifts bits right for the number by stripping the specified rightmost digits of the number represented in binary. The number returned is represented in decimal.||3||13 is represented as 1101 in binary. Stripping the rightmost two digits results in 11, which is 3 in decimal.|