BITRSHIFT in Google Sheets: Unpack Fields and Preserve Remainders
Remove low-order bits with Google Sheets BITRSHIFT, inspect its documented count interval and reproduce reversible quotient-and-remainder checks.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: BITRSHIFT(value,shift_amount) shifts a nonnegative value right, filling the left with zeros. The Google reference states shift counts from −52 through 53; a negative count shifts left instead.
Availability and version history
- Introduced: first introduction date is not established by the reviewed official history; no desktop release number is inferred.
- Availability: documented in the rolling Google Sheets service; these examples use the web worksheet workflow.
- Checked: October 14, 2026; official BITRSHIFT reference. Documentation and independent models, with no native Sheets execution or wider client certification.
Syntax and documented boundaries
=BITRSHIFT(value,shift_amount)
Both arguments are required. The dedicated page gives the nonnegative-value rule and the −52 to 53 count interval. That lower endpoint differs from the −53 stated for BITLSHIFT; this guide preserves the individual references rather than guessing which boundary a native build accepts.
Google also documents that text “3” may coerce to 3 and TRUE to 1. It does not provide a complete value ceiling, fractional-input policy, overflow rule or error-code table. The worked controls use small integer values and counts inside both documented intervals.
For these nonnegative integers, a right shift by k positions gives the integer quotient after division by 2^k. It removes bits; it does not round the ordinary fractional quotient to the nearest integer.
Example 1: compare bit removal with division
Enter 23 in A2 and counts 0, 1, 2, 3, 4 and 5 in B2:B7. In C2 enter and fill through C7:
=BITRSHIFT($A$2,B2)
In D2 enter =$A$2/2^B2 and fill down.
| Count | Shift result | Division result |
|---|---|---|
| 0 | 23 | 23 |
| 1 | 11 | 11.5 |
| 2 | 5 | 5.75 |
| 3 | 2 | 2.875 |
| 4 | 1 | 1.4375 |
| 5 | 0 | 0.71875 |
The binary value 10111 becomes 101 after two right shifts, giving 5. A nearest-integer rounding of 5.75 would produce 6, so ROUND answers a different question.
The zero-count control leaves 23 unchanged. Google’s own example uses 8 shifted by two to give 2, which follows the same positional model.
Example 2: unpack two three-bit fields
A small record format stores a high field and a low field, each from 0 through 7. Enter packed values 53, 7, 56 and 63 in F2:F5.
In G2 enter =BITRSHIFT(F2,3) and in H2 enter =BITAND(F2,7). Fill both down.
| Packed value | High field | Low field |
|---|---|---|
| 53 | 6 | 5 |
| 7 | 0 | 7 |
| 56 | 7 | 0 |
| 63 | 7 | 7 |
The first value is binary 110101. Removing the lowest three bits leaves 110, or 6. Mask 7 retains the lowest three bits 101, or 5. BITAND performs that separate extraction.
Reconstruct each value with =BITOR(BITLSHIFT(G2,3),H2). The outputs return to 53, 7, 56 and 63. This verifies the defined layout for valid data; it does not certify the layout of an unknown external file.
Advanced example: keep the bits a shift discards
Enter 23, 20, 31 and 32 in K2:K5. In L2 use =BITRSHIFT(K2,2) and in M2 use =BITAND(K2,3), then fill down.
The integer quotients are 5, 5, 7 and 8. The two-bit remainders are 3, 0, 3 and 0. Reconstruct each input in N2:
=BITLSHIFT(L2,2)+M2
After filling down, the results are 23, 20, 31 and 32. If you omit the remainder and shift back alone, the values become 20, 20, 28 and 32. The difference is exactly the discarded low-bit value.
For this small nonnegative model, a k-bit remainder mask is 2^k−1. Keep any generalized formula inside independently verified input bounds; the mathematical identity is not a promise about untested native overflow.
Negative counts and explicit coercion
=BITRSHIFT(5,-3) moves left and returns 40, matching =BITLSHIFT(5,3). A negative shift count is therefore different from a negative source value, which violates the stated nonnegative requirement.
Applying Google’s documented conversions gives these independently expected controls:
=BITRSHIFT("3",1)returns 1.=BITRSHIFT(TRUE,1)returns 0.=BITRSHIFT(TRUE,-2)returns 4.
Do not extend those examples into a universal acceptance rule for text or logical/error values. A successful coerced calculation may still reveal inconsistent source types.
Use DEC2BIN for small binary labels when helpful. Decimal rendering, binary representation and the numeric result are separate concepts. Fractional values/counts, large widths and exact native error displays remain unverified.
References and verification
Examples use fictional data, English function names and comma separators. Expected outputs are independent mathematical calculations or explicitly documented rules, not native Sheets captures. Check the spreadsheet locale when reproducing punctuation-sensitive formulas.