Contact

DEC2BIN in Collabora Office: Create Padded Binary Labels from Numeric Values

Engineering Intermediate Collabora Office Calc

Create binary text in Collabora Calc, keep the documented -512 to 511 input range and explain padded positive fields and ten-character negative output.

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

Quick answer: DEC2BIN converts a number into a binary string. Its documented input range is −512 through 511. For a positive value and explicit width, =DEC2BIN(42;8) has expected text 00101010.

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 the optional width

=DEC2BIN(Number [; Places])

Number is the quantity to convert. Places is the number of output positions. The official section marks Places optional but does not explicitly state its omitted default, fractional handling or exact error codes for insufficient width.

For negative Number, the source explicitly says the result has ten characters and a sign bit. The paired BIN2DEC documentation specifies two’s-complement interpretation. Negative examples below are independently modeled using that convention and omit Places rather than asserting how conflicting width requests are resolved.

Use integer inputs in these examples. The sparse section does not establish a decimal-input truncation rule.

Example 1: align positive bit labels

Enter 0, 5, 42, 85 and 255 in A2:A6. In B2 enter and fill through B6:

=DEC2BIN(A2;8)
Number Expected eight-character string
0 00000000
5 00000101
42 00101010
85 01010101
255 11111111

Aligned positions make comparisons easier. The value 42 has set weights 32, 8 and 2, so its representation is 00101010. The leading zeros preserve the requested display width without changing the quantity.

In C2 put =BIN2DEC(B2) and fill down. The expected numeric results recover 0, 5, 42, 85 and 255. The eight-character all-ones string decodes as positive 255 in the paired converter’s ten-bit signed system.

Example 2: distinguish output width from numeric capacity

These use the same number with different sufficient widths:

=DEC2BIN(42;6)
=DEC2BIN(42;8)
=DEC2BIN(42;10)

Expected text is 101010, 00101010 and 0000101010. The value remains 42. Padding does not enlarge the function’s allowed number interval.

For the upper documented positive input, =DEC2BIN(511;10) has expected string 0111111111. The leading zero keeps the sign bit clear. Input 512 lies outside the stated Number interval, even though an unsigned ten-bit representation exists mathematically; its exact native error code is not supplied by this section.

Advanced example: independently explain negative output

Use the documented ten-bit width and paired decoder’s two’s-complement rule:

Number Add 1024 for the unsigned bit pattern Expected ten-character string
-1 1023 1111111111
-2 1022 1111111110
-42 982 1111010110
-512 512 1000000000

Put these numbers in E2:E5 and use =DEC2BIN(E2) in F2, filling down. These strings are modeled consequences of the documented conventions, not native execution observations. BIN2DEC explains the inverse subtraction of 1024.

The representation is not a minus sign followed by a positive binary magnitude. In particular, the lower endpoint −512 has a single leading 1 followed by nine zeros.

Advanced check: concatenate two four-bit fields

A record format defines two fields, each an integer from 0 to 15. Enter high field 6 in H2 and low field 11 in I2.

=DEC2BIN(H2;4)&DEC2BIN(I2;4)

Expected text is 01101011. The numeric packed value is =H2*16+I2, or 107. Applying =DEC2BIN(107;8) gives the same expected eight-character string.

This equivalence depends on the stated field limits. A value outside 0–15 no longer fits four bits; padding is not validation. Preserve the separate numeric fields if later calculations need them.

Practical boundaries

Keep converted labels as text and numeric sources as numbers. Arithmetic or sorting on a representation need not mean the same thing as operating on its decoded value.

Input −513 also lies outside the documented interval. Fractional numbers, omitted positive-width defaults, zero or negative Places and native error precedence remain unverified. DEC2HEX offers a different representation, but its own sparse reference must be checked independently rather than assuming identical numeric limits.

References and verification

Complete function-specific documentation reviewed. Outputs are independently calculated positional models or explicitly documented controls, 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.