OCT2BIN function

OCT2BIN(Number, DigitCount?) OCT2BIN(Number; DigitCount?)

Number

Text or { Text }

An octal number.

DigitCount

Number or { Number } (optional)

The number of digits to return. If omitted, the minimum number of digits necessary to accurately represent the number is used.

Returns

Text or { Text }

A binary number.

Converts an octal number to a binary number. Also consider using the more general functions BASE and DECIMAL. Perform the reverse conversion using BIN2OCT.

Examples

OCT2BIN("5")OCT2BIN("5")

Returns "101".

OCT2BIN("5", 4)OCT2BIN("5"; 4)

Returns "0101".

OCT2BIN("173")OCT2BIN("173")

Returns "1111011".

BASE(DECIMAL("173", 8), 2)BASE(DECIMAL("173"; 8); 2)

Returns "1111011".

OCT2BIN({ "5", "173" })OCT2BIN({ "5"; "173" })

Returns the array { "101", "1111011" }{ "101"; "1111011" }.