OCT2BIN(number [,places])

Returns the number converted from octal to binary.

numberThe octal number you want to convert.
places(Optional) The number of characters to use.


* The "number" may not contain more than 10 characters. The most significant bit of number is the sign bit. The remaining 29 bits are magnitude bits.
* If "number" is not a valid octal number, then #NUM! is returned.
* If "number" contains more than 10 characters (10 bits), then #NUM! is returned.
* If "number" < 0, then "places" is ignored and returns a 10-character binary number.
* If "number" < 0, it cannot be less than or equal to 7777777000, and if number is positive, it cannot be greater than 777.
* If "places" is not an integer, it is truncated.
* If "places" is not numeric, then #VALUE! is returned.
* If "places" < 0, then #NUM! is returned.
* If "places" is left blank, then the minimum number of characters necessary is used. Places is useful for padding the return value with leading 0s (zeros).
* If "places" is not enough characters, then #NUM! is returned..
* Any negative numbers are represented using two's complement notation.
* You can use the OCT2DEC function to convert a number from octal to decimal.
* You can use the OCT2HEX function to convert a number from octal to hexadecimal.
* You can use the BIN2OCT function to convert from binary to octal.
* In Excel 2007 the accuracy of this function was improved.
* For the Microsoft documentation refer to support.microsoft.com

1=OCT2BIN(1,1) = 1
2=OCT2BIN(2,2) = 10
3=OCT2BIN(3,3) = 011
4=OCT2BIN(77777) = #NUM!
5=OCT2BIN(123456789123) = #NUM!
6=OCT2BIN("some text",3) = #NUM!
7=OCT2BIN(3,"some text") = #VALUE!

© 2021 Better Solutions Limited. All Rights Reserved. © 2021 Better Solutions Limited Top