OCT2BIN

Converts an octal number to binary.

Sample Usage

OCT2BIN(5)
OCT2BIN(C5)

Syntax

OCT2BIN(number, [places])

  • number - The octal number to be converted.
  • places - [OPTIONAL] The number of places in the output.

Examples

OCT2BIN(5) returns a value of 101.
OCT2BIN(5,5) returns a value of 00101.
OCT2BIN(C5) converts the octal number contained in C5 to binary.

Notes

  • If number is negative, the value of places is ignored and OCT2BIN returns a 10-character binary number. 
  • number cannot contain more than 10 characters.
  • number can have a maximum value of 777 if positive, and a minimum of 7777777000 if negative. 
  • If number is not a valid octal number, OCT2BIN returns the #NUM! error value.
  • If places is not an integer, it is truncated.
  • If places is non-numeric, OCT2BIN returns the #VALUE! error value.
  • If places is negative, OCT2BIN returns the #NUM! error value.
  • If the number of digits required is greater than the specified places, the #NUM! error is returned.