Contact

OCT2BIN in WPS Spreadsheet: Expand Octal Records into Signed Binary Fields

Engineering Intermediate WPS Spreadsheet

Convert octal text to binary in WPS Spreadsheet, respect the smaller target interval and verify fixed-width round trips using explicit source rules.

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

Quick answer: OCT2BIN converts octal input to binary text. =OCT2BIN("123",9) has independently expected result 001010011, representing decimal 83.

Availability and version history

  • Introduced: documented by 2019-05-08 in the official WPS lesson; the first release is not established.
  • Availability: the lesson labels Windows Personal and explicitly demonstrates WPS 2019.
  • Scope: exact current supported builds and other WPS clients remain unverified.
  • Checked: October 14, 2026. Documentation and independent calculations; no native WPS execution.

Syntax and the narrower target range

=OCT2BIN(number,[places])

The May 8, 2019 Windows Personal lesson explicitly demonstrates WPS 2019. It describes up to ten octal characters, with a thirty-bit signed interpretation, but restricts the accepted quantity to what the binary target can represent.

The stated positive endpoint is octal 777, or 511. The negative endpoint is 7777777000, or −512 in the thirty-bit input model. A valid larger octal quantity is therefore not automatically admitted by this converter.

Places is optional and defaults to the minimum necessary output width. Negative inputs ignore places and return ten binary positions. Fractional places is truncated. These rules are stated for this WPS lesson, rather than borrowed from another spreadsheet.

Example 1: expand three-digit records

Format A2:A6 as Text and enter only the first column. Calculate B with =OCT2BIN(A2,9) filled down. The decimal column is an explanatory check, not another input column.

A, octal text B, nine-bit field Decimal check
007 000000111 7
034 000011100 28
123 001010011 83
265 010110101 181
777 111111111 511

Each octal digit corresponds to three bits. For 265, the groups are 010, 110 and 101. Joining those groups gives 010110101 and preserves quantity 181.

The last nine-character field is still positive in the ten-bit signed binary convention. A leading one in a shorter field does not automatically identify a ten-bit negative value.

Example 2: distinguish positive suffixes from full negatives

Formula Expected binary
=OCT2BIN("771",9) 111111001
=OCT2BIN("7777777771",4) 1111111001
=OCT2BIN("7777777000",4) 1000000000
=OCT2BIN("777",10) 0111111111

The quantities are 505, −7, −512 and 511. Short 771 is positive; the full ten-character octal input ending in 771 represents −7. Dropping its sign-extension characters changes the meaning.

For −7, the ten-bit unsigned encoding is 2^10−7=1017, yielding 1111111001. The valid width of four cannot shorten the documented ten-character negative output.

Advanced example: audit both representations

For the primary table, put =OCT2DEC(A2) in C2 and =OCT2DEC(BIN2OCT(B2)) in D2, filling down. Both have independently expected numbers 7, 28, 83, 181 and 511.

BIN2OCT returns the octal representation under its documented signed contract; OCT2DEC then exposes the numeric quantity. The formulas use only values that fit both converters.

For a character-level round trip, put =BIN2OCT(B2,3) in E2. Filling down recovers 007, 034, 123, 265 and 777 because this fixture’s original width is explicitly supplied.

A numeric round trip alone would not recover an arbitrary number of leading zeros. Preserve the original strings if exact file reconstruction matters.

Advanced example: decode before addition

The first two records represent 7 and 28, totaling 35. Use:

=DEC2BIN(OCT2DEC(A2)+OCT2DEC(A3),9)

Expected binary: 000100011. DEC2BIN receives the actual decimal quantity, not the octal-looking input digits.

Adding labels 007 and 034 as ordinary decimal numbers gives 41. Octal 41 represents 33, so simply relabeling that answer as octal would still be wrong. The base interpretation belongs before the arithmetic.

Reproduce source controls and errors

The WPS walkthrough explicitly demonstrates =OCT2BIN(2,3) giving 010, and octal 222 without a width giving 10010010, or decimal 146.

The formal notes document #NUM! for invalid octal input and insufficient places, #VALUE! for nonnumeric places and #NUM! for negative places. Thus 128 is an invalid octal string, and 123 needs seven binary digits, so a width of six is insufficient.

=OCT2BIN("123",9.9) truncates the width to nine and gives 001010011. General blank/Boolean coercion, native precision and the exact error code for every otherwise valid out-of-range quantity remain unverified.

References and verification

Complete function-specific documentation reviewed. Worked outputs are independently calculated expectations, not captured native results. Formulas use English names and comma separators; check the installed locale. Product/client and source gaps retain their explicit scope.