BIN2OCT Function (Calligra Sheets)
Convert binary strings to octal text in Calligra Sheets, with optional output padding, positional round trips and strict digit validation.
Verification status: Selected formulas were executed through the Calligra Sheets 25.04.2 calculation engine library. Version 26.08.2 was source-checked only. How formula examples are checked
Quick answer: =BIN2OCT("111001101";4) gives 0715 in the tested Calligra calculation engine. The result is text, including any leading zeroes.
Availability and version history
- Introduced: First release not established; the name is present in Calligra 2.4.0 source.
- Supported in: Calligra Sheets 26.08.2, with no retirement established.
- Scope: Desktop Sheets with the Engineering module. Examples use English semicolon-separated formulas.
- Checked: October 14, 2026. Formulas were executed through the official 25.04.2 engine library and checked against source and independent mathematics. This is not GUI-cell or workbook-import evidence; 26.08.2 was source-checked, not executed.
What BIN2OCT returns
BIN2OCT reads a binary representation and returns octal text for the same nonnegative integer. Three binary positions correspond to one octal digit. Grouping 111001101 from the right as 111, 001, 101 gives octal 715, representing decimal 461. Function help.
Syntax and arguments
=BIN2OCT(binary[;places])
Binary is required; places is an optional minimum number of octal output characters. The registration accepts one or two arguments even though the short help syntax shows only one. Supply a quoted digit string or a text cell containing only 0s and 1s. Places counts output characters, not input bits. Brackets mark an optional argument and are not entered in a formula. Registration and implementation, with versioned help.
Reproducible engine examples
Backticks preserve literal leading zeroes in text results. Numeric decoder results do not preserve an input field’s padding.
| Formula | Engine result |
|---|---|
=BIN2OCT("0") |
0 |
=BIN2OCT("111") |
7 |
=BIN2OCT("1000") |
10 |
=BIN2OCT("1111") |
17 |
=BIN2OCT("1000000";4) |
0100 |
=BIN2OCT("111001101";4) |
0715 |
=BIN2OCT("1000000000") |
1000 |
=BIN2OCT("1111111111") |
1777 |
Practical worksheet
Put the binary text 1000000 in A2 and width 4 in B2. =BIN2OCT(A2;B2) returns 0100. The significant value is octal 100, which equals decimal 64; the first zero is output padding. Preserve the encoded field as text when transferring it to a file that needs that width.
Advanced interpretation and checks
The recorded =OCT2BIN(BIN2OCT("111001101")) returns 111001101. This checks the value across two representations. If the original binary field contained leading zeroes, supply an explicit final binary width to restore them. A value round trip does not remember an input field’s formatting.
The ten-bit string 1111111111 gives octal 1777, or decimal 1023. The leading bit is treated as magnitude in this example. Do not import a signed ten-bit convention from another spreadsheet or hardware format without an explicit conversion rule.
Input boundaries and cautions
The wrapper requires an uninterrupted unsigned binary digit sequence. Invalid digit 2, a minus sign and surrounding spaces returned #VALUE! in the tested engine. A short width does not truncate: BIN2OCT("1111";1) still gives 17. A negative width added no padding, and 3.9 became a three-character width. Choose valid integer widths explicitly.
| Formula | Engine result |
|---|---|
=BIN2OCT("102") |
#VALUE! |
=BIN2OCT("-1") |
#VALUE! |
=BIN2OCT(" 111 ") |
#VALUE! |
=BIN2OCT("1111";1) |
17 |
=BIN2OCT("1111";-1) |
17 |
=BIN2OCT("1111";3.9) |
017 |
Numeric range and data handling
The shared encoder narrows the decoded value to a C++ int before formatting. These small exact examples do not establish conversion of arbitrarily long identifiers. Keep original strings and validate both the intended value and destination field capacity. The Engineering module and conversion helper are byte-identical in the inspected 25.04.2 and 26.08.2 sources.