Contact

OCT2BIN Function (Gnumeric)

Engineering Intermediate Gnumeric

Convert octal text with Gnumeric OCT2BIN, including native binary examples, padding, signed-width hazards and a version-scoped extreme-input warning.

Verification status: 18 reference, boundary and advanced-check formulas were recalculated through Gnumeric 1.12.57 ssconvert with retained native formula identities and ODF results. Independent arithmetic and 1.12.62 source were also checked; 1.12.62 was not executed. How formula examples are checked

Quick answer: =OCT2BIN("377",10) returns 0011111111 in Gnumeric 1.12.57. The result is text, so leading zeroes are significant for its displayed representation.

Availability and version history

  • Introduced: First release not established.
  • Supported in: Gnumeric 1.12.62, with no retirement established.
  • Scope: Desktop Gnumeric with the Engineering plugin; English comma-separated formulas are used below.
  • Checked: October 14, 2026. The reference and boundary tables plus the explicit roundtrip or recurrence were recalculated through 1.12.57 ssconvert and compared with native formula records, source and independent arithmetic. 1.12.62 is source-checked only.

What OCT2BIN returns

OCT2BIN converts octal digits into binary text. Octal 715 represents 7×64+1×8+5=461 and becomes binary 111001101. Digits 8 and 9 are not octal digits. Versioned function help.

Syntax and arguments

=OCT2BIN(x[,places])

x is required. Use quoted octal text to preserve the original representation. Optional places requests a padded width for ordinary positive output; it does not truncate a value to fit. A supplied width above ten or below the necessary width fails. Brackets mark optional arguments and are not typed into the formula. Function implementation.

Reproducible examples

Backticks preserve the exact digits and padding; text encodings are not decimal quantities. All eight reference rows below were recalculated in the stated 1.12.57 build.

Formula Gnumeric 1.12.57 result
=OCT2BIN("0") 0
=OCT2BIN("7") 111
=OCT2BIN("10") 1000
=OCT2BIN("377",10) 0011111111
=OCT2BIN("715") 111001101
=OCT2BIN("777") 111111111
=OCT2BIN("1000") 1000000000
=OCT2BIN("7777777777") 1111111111

Practical worksheet

For a small octal field, put the text 715 in A2 and enter =OCT2BIN(A2) in B2. The result 111001101 is useful for inspecting the individual bit positions. Keep the original text field rather than replacing it, because representation and intended width are separate from value.

For the octal field 377, =OCT2BIN("377",10) returns 0011111111, retaining ten output positions while representing positive 255.

Advanced checks and interpretation

The executed positive-value check =BIN2OCT(OCT2BIN("715"),4) returns 0715. The final argument restores a four-character octal field. It does not demonstrate safe roundtripping for larger signed inputs.

Octal 1000 produces 1000000000, which represents positive 512 in this conversion. The same ten-character bit pattern is interpreted as negative by signed binary-input functions. Validate the destination’s signed width rather than assuming any returned string can be fed back safely.

Boundaries and troubleshooting

Keep extreme negative encodings outside the validated working range. In the tested 1.12.57 build, =OCT2BIN("4000000000") returned an empty text string, not a binary encoding or a reported error. Its source value is −536870912, far outside a signed ten-bit binary field. This is an anomalous observed result, not a recommended conversion.

The shared conversion helper changed by 1.12.62, so that exact input’s result in the newer release is not established by these tests. The ordinary examples and the tested −1 encoding do not resolve the extreme-negative case for other versions. Do not interpret empty output as zero or silently continue downstream calculations.

In the following tests F5 is an actually empty cell. The empty string "", when present, is an explicit string argument.

Formula Gnumeric 1.12.57 result
=OCT2BIN("8") #NUM!
=OCT2BIN("-1") #NUM!
=OCT2BIN(" 17 ") #NUM!
=OCT2BIN("") 0
=OCT2BIN(F5) #NUM!
=OCT2BIN("17",1) #NUM!
=OCT2BIN("17",11) #NUM!
=OCT2BIN("17",6.9) 001111
=OCT2BIN("4000000000") empty text string

Conversion and version limits

The shared conversion helper controls parsing, complement handling and width checks. The individual function entry is unchanged between the inspected 1.12.57 and 1.12.62 sources, but the shared digit-extraction helper changed. These native results therefore establish 1.12.57, not automatic equivalence for every 1.12.62 boundary. A stale SUM cache and an uncached SUM formula both recalculated correctly, with original function identities retained. Other locales, GUI entry and extreme values beyond the listed cases were not tested.