Contact

BITRSHIFT in Excel: Extract Fields and Track Discarded Bits

Engineering Intermediate Microsoft Excel

Use Excel BITRSHIFT to remove low-order bits, unpack small fields and distinguish integer shifts from division that retains fractions.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: BITRSHIFT(number,shift_amount) removes rightmost binary digits for a positive shift count and returns the remaining decimal integer. A negative count shifts left. Right shifts can discard information, so they are not always reversible.

Availability and version history

  • Introduced: the Microsoft function catalogue marks this identity as an Excel 2013 addition. An exact first build or preview date is not established.
  • Availability: official help lists Excel for Microsoft 365, Excel for Microsoft 365 for Mac, Excel 2024, Excel 2024 for Mac, Excel 2021, Excel 2021 for Mac, Excel 2019, Excel 2016.
  • Checked: October 14, 2026; official BITRSHIFT reference. Documentation and independent models; no native Excel execution or wider platform certification.

Syntax and documented constraints

=BITRSHIFT(number,shift_amount)

Both arguments are required integers. number must be from 0 through 2^48−1, or 281474976710655. The absolute value of shift_amount must be at most 53. Microsoft assigns #NUM! to constraint violations and #VALUE! to nonnumeric arguments.

For the nonnegative inputs here, a positive k-bit shift corresponds to the integer quotient after division by 2^k. This is a bit-removal rule, not rounding to the nearest integer. A negative count has the same result as a positive count in BITLSHIFT.

The reference does not settle all output-overflow cases when a negative count shifts left. The small examples below do not certify extreme native behavior, numeric-text coercion or a wider platform list than the availability section.

Example 1: compare shifts with ordinary division

Enter 13 in A2 and counts 0, 1, 2, 3 and 4 in B2:B6. In C2 enter and fill through C6:

=BITRSHIFT($A$2,B2)

In D2 enter =$A$2/2^B2 and fill down.

Count Shift result Ordinary division
0 13 13
1 6 6.5
2 3 3.25
3 1 1.625
4 0 0.8125

Binary 13 is 1101. Removing two trailing digits leaves 11, or decimal 3. Ordinary division retains the fraction represented by the discarded bits.

For count 3, rounding 1.625 to the nearest integer would give 2, while the shift result is 1. This makes a useful control against using ROUND as a substitute for bit removal.

Example 2: unpack a byte-sized record

A report encodes two quantities, each an integer 0–15, into one value. The high field uses the upper four bits; the low field uses the lower four. Enter 57, 15, 240 and 255 in F2:F5.

In G2 enter =BITRSHIFT(F2,4) and in H2 enter =BITAND(F2,15). Fill both down.

Packed value High field Low field
57 3 9
15 0 15
240 15 0
255 15 15

The first row is binary 00111001. Shifting four places keeps 0011, or 3; the mask 15 keeps 1001, or 9. BITAND performs that separate extraction.

In I2 enter =BITOR(BITLSHIFT(G2,4),H2) and fill down. The reconstructed values are 57, 15, 240 and 255. This verifies the arithmetic layout for these valid inputs. It does not validate an unknown device protocol or its field definitions.

Advanced example: retain the discarded remainder

Enter 13, 12, 15 and 16 in K2:K5. A two-bit right shift divides the value into groups of four. In L2 use =BITRSHIFT(K2,2); in M2 use =BITAND(K2,3); fill down.

The quotient results are 3, 3, 3 and 4. The low-bit remainders are 1, 0, 3 and 0. Because mask 3 is binary 11, it retains exactly the two removed bits.

Reconstruct each input in N2 with:

=BITLSHIFT(L2,2)+M2

After filling down, the outputs are 13, 12, 15 and 16. Omitting the remainder gives 12, 12, 12 and 16 instead. That comparison shows precisely when a shift-back loses information.

For a positive shift of k positions, the low-bit mask in this small arithmetic model is 2^k−1. Keep any generalized formula within the documented numeric limits rather than extending the model into unverified overflow cases.

=BITRSHIFT(3,-4) shifts left and returns 48. =BITLSHIFT(3,4) is the documented equivalent. A negative input number is different from a negative shift count: the former violates the input constraint.

Fractional arguments and shift counts outside −53 through 53 violate the stated constraints. =BITRSHIFT(0,4) is a zero control and returns 0. For a visual binary label of the small values used here, DEC2BIN is useful, but its separate −512 to 511 range must still be respected.

References and verification

Expected outputs are independently calculated examples or documented rules, not captured native Excel results. Formulas use English function names and comma argument separators. Locale, rendering and boundary restrictions are stated where relevant.