Skip to main content
← All functions

BIN2OCT function

Converts a binary number to octal.

Syntax

BIN2OCT(number, [places])

Square brackets indicate optional arguments.

Arguments

ArgumentRequiredMeaning
numberYesRequired. The binary number you want to convert. Number cannot contain more than 10 characters (10 bits). The most significant bit of number is the sign bit. The remaining 9 bits are magnitude bits. Negative numbers are represented using two's-complement notation.1001
placesNoOptional. The number of characters to use. If places is omitted, BIN2OCT uses the minimum number of characters necessary. Places is useful for padding the return value with leading 0s (zeros).3

Try BIN2OCT

Convert a base representation with BIN2OCT

=BIN2OCT(A2,B2)

Binary 11101 is decimal 29, which is octal 35. Four places preserve two leading zeroes. These small positive examples avoid signed two-complement limits.

Inspect the current formula

Read its written arguments or observe actual operation values in a separate local calculation. This action neither applies a draft nor grades an answer.

Read the formula, one argument at a time

Explore the written function calls and their inputs. The calculation result belongs to the complete formula.

BIN2OCT · top-level call

=BIN2OCT(A2,B2)

1 / 2 · number

Required. The binary number you want to convert. Number cannot contain more than 10 characters (10 bits). The most significant bit of number is the sign bit. The remaining 9 bits are magnitude bits. Negative numbers are represented using two's-complement notation.

BIN2OCT reference ↗

Follow the cells behind a result

Read explicit local references and helper formulas using a separate calculation. Your draft stays in this field; the worksheet and practice checks do not change.

The worksheet runs locally. Published checks apply to the supplied example only. Native Excel and Google Sheets compatibility remain unverified.

Reference and compatibility

Univer 1.0.4 / Apache-2.0. Calculation checks cover the supplied examples only. The browser worksheet does not implement every Excel feature, external service or connected data type.