BITRSHIFT in Collabora Office: Unpack Positive Integer Records and Preserve Remainders
Remove low bits in Collabora Calc, independently verify packed-field extraction and retain remainders when reconstructing a shifted value.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: BITRSHIFT removes the requested low-order bit positions and returns the remaining number. =BITRSHIFT(29;2) has independently expected result 7. A negative count shifts left instead.
Availability and version history
- Introduced: the original Collabora release and launch date are not established by the reviewed sources.
- Availability: documented in Collabora Office 26.04 desktop help.
- Platform scope: online and mobile deployment support is not inferred from the desktop documentation.
- Checked: October 14, 2026. Function-specific documentation and independent controls; no native Collabora execution.
Syntax and documented boundaries
=BITRSHIFT(Number; Shift)
The Collabora help specifies a positive integer Number below 2^48, or 281474976710656. Shift describes the positions to move right; a negative Shift is explicitly synonymous with BITLSHIFT(Number;-Shift).
The reference does not give an absolute count limit, fractional-count rule, zero-input acceptance, full overflow policy or native error table. Those details remain unverified. All source numbers in this guide are strictly positive and all counts are small integers.
For positive integer inputs and counts, the independent model takes the integer quotient after division by 2^Shift. This removes bits rather than rounding the fractional quotient to the nearest integer.
Example 1: compare shifting with ordinary division
Enter 29 in A2 and counts 1, 2, 3, 4 and 5 in B2:B6. Put =BITRSHIFT($A$2;B2) in C2 and fill down. Put =$A$2/2^B2 in D2 and fill down.
| Count | Expected shift output | Ordinary quotient |
|---|---|---|
| 1 | 14 | 14.5 |
| 2 | 7 | 7.25 |
| 3 | 3 | 3.625 |
| 4 | 1 | 1.8125 |
| 5 | 0 | 0.90625 |
Binary 29 is 11101. Removing two rightmost digits leaves 111, or 7. At count 3, nearest-integer rounding of 3.625 would give 4, but the bit-removal model gives 3.
The final zero is an output of a positive-input shift. The tutorial does not pass it back into another bit function or assume that the documentation’s positive-input wording includes zero.
Example 2: unpack two four-bit fields
A declared record format stores two positive integer fields, each from 1 through 15. Enter packed values 17, 92, 227 and 255 in F2:F5.
Use =BITRSHIFT(F2;4) in G2 and =BITAND(F2;15) in H2, filling both down.
| Packed number | High field | Low field |
|---|---|---|
| 17 | 1 | 1 |
| 92 | 5 | 12 |
| 227 | 14 | 3 |
| 255 | 15 | 15 |
For 92, binary 01011100 separates into 0101 and 1100. Shifting removes the low field; BITAND extracts it with mask 15.
The reconstruction =BITOR(BITLSHIFT(G2;4);H2) returns the original packed values. Every intermediate bit-function input is positive in this fixture, preserving the source scope.
Advanced example: keep the discarded remainder
Enter 29, 28, 35 and 36 in K2:K5. Use =BITRSHIFT(K2;2) in L2 and =BITAND(K2;3) in M2, filling down.
Expected quotients are 7, 7, 8 and 9. Expected remainders are 1, 0, 3 and 0. Mask 3 retains exactly the two lowest positions.
In N2 enter and fill down:
=BITLSHIFT(L2;2)+M2
The expected results recover 29, 28, 35 and 36. The remainders are added with ordinary arithmetic, so their zero values are not passed as inputs to a bit function.
If the remainder is omitted, shifting back alone gives 28, 28, 32 and 36. This reveals exactly which records lost nonzero low bits.
Negative counts and a second control
=BITRSHIFT(7;-3)
=BITLSHIFT(7;3)
Both have independently expected result 56. A negative count changes direction; it is not the same thing as a negative Number, which is outside the cited positive-input wording.
The official control =BITRSHIFT(6;1) returns 3, consistent with removing one bit from binary 0110 to leave 0011.
Practical scope
ROUND changes a numeric value according to a rounding rule and is not a substitute for bit removal. DEC2BIN can show the small record’s visual bit pattern but has its own narrower signed conversion contract.
The simple remainder identity uses mask 2^k−1 in the independent small-integer model. It is not a promise that arbitrary counts or very large native results are supported. Keep a field definition beside the data, validate its allowed values and retain original records when information loss matters.
Native zero inputs, fractions, coercion, shift endpoints and overflow/errors remain unverified by the short product-specific reference.
References and verification
Complete function-specific documentation reviewed. Outputs are independently calculated positional, equality or arithmetic models, not captured native application results. Formulas use English names and semicolon separators; optional-argument brackets describe syntax and are not typed into a working formula.