
Shift bits to the right by a chosen number of positions. Useful for reducing by powers of two and pulling values out of higher bit positions.
BITRSHIFT moves the bits of a number to the right by a chosen number of positions. In practical terms, shifting right reduces the value by powers of two and drops any remainder that falls off the right side.
This is useful when a value is stored in higher bit positions and you want to bring it back down into a simpler range. It is also a fast way to do whole-number division by powers of two when you are working with bit-based data.
BITRSHIFT is often used to simplify or expose information hidden in higher positions. By shifting the pattern right, the workbook can pull a stored piece of data down into a range that is easier to read or compare. That makes it useful for extraction logic in packed numeric values.
Moves bits into lower positions.
Returns the decimal value of the shifted bit pattern.
=BITRSHIFT(number, shift_amount)
number is the starting value. shift_amount is how many positions to move the bits.
A positive shift moves the bits to the right. A negative shift moves them left instead and behaves like BITLSHIFT. Excel still returns the result as a decimal number, so you do not have to convert it back manually after the shift.
number must be a whole number that is 0 or larger, and shift_amount must also be a whole number. Right shifts are often used to pull a value out of higher bit positions. Very large shifts can exceed Excel's supported limits and return #NUM!.
BITRSHIFT is about moving bits down, not ordinary division with decimals:
| Function | What it does | Typical use | Result |
|---|---|---|---|
BITRSHIFT |
Moves bits right | Reduce by powers of two or extract higher bits | Number |
BITLSHIFT |
Moves bits left | Scale up or place bits higher | Number |
/ |
Divides numbers normally | Regular arithmetic | Number |
BITAND |
Keeps shared bits | Mask after shifting | Number |
The easiest way to think about BITRSHIFT is that every right shift divides by 2 and drops any remainder. A shift of 1 halves the value, a shift of 2 divides by 4, and so on. That makes it useful when you want a clean whole-number result from a bit-based value.
It is also useful for extraction. If part of a number is stored in higher bits, shifting right moves that part closer to the low end where it is easier to read or combine with a mask. That is a common pattern when values are packed into one larger integer.
Microsoft also notes that BITRSHIFT works with non-negative integers up to 2^48 - 1, and if the absolute shift amount is greater than 53 Excel returns #NUM!. A negative shift amount acts like shifting left. Source: Microsoft Support, BITRSHIFT function.
This example shows the simplest right shift rule. Moving every bit one place to the right divides the value by 2 and drops any remainder.
That is why 10 becomes 5 here. It is the easiest way to connect the bit movement with the normal decimal result Excel returns.
=BITRSHIFT(10, 1) // Returns 5
Shift decimal 10 right by 1 bit (/2).
This example is useful when part of a packed number lives in higher bits. Shifting right moves that stored value back down into a simpler range where it can be read directly.
That is why the result becomes 255. The higher-byte pattern is being pulled out and brought back into the low end of the number.
=BITRSHIFT(65280, 8) // Returns 255
Shift 16-bit high-value 65280 to its 8-bit base.
This example shows that a larger right shift works like dividing by a larger power of two. A shift of 4 means divide by 16.
It is a quick way to scale down bit-based values or isolate groups of bits without writing a longer formula.
=BITRSHIFT(256, 4) // Returns 16
Shift 256 by 4 bits to divide by 16.
This example matters because right shifts do not keep fractions. When 7 is shifted right by 1, Excel does not return 3.5. It drops the remainder and returns 3.
That helps explain why bit shifting is useful for whole-number extraction but not for preserving exact decimal divisions.
=BITRSHIFT(7, 1) // Returns 3
Shift decimal 7 right by 1 bit.
BITRSHIFT is the opposite movement: it brings a bit pattern down into lower positions. In this lesson, that helped show why right shifts behave like division by powers of two, except that Excel drops any remainder because bitwise work stays in whole-number form.
That is why BITRSHIFT is useful for extraction and simplification. If important information is stored in higher bits, shifting right can move that information into an easier-to-read range without changing the underlying bit logic first.
#NUM!.Tell your friends about this post