BIN2OCT

  • Updated

Converts a binary number to octal.

Sample Usage

BIN2OCT(101)
BIN2OCT(C5)

Syntax

BIN2OCT(number, [places])

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

Examples

BIN2OCT(1100) returns a value of 14.
BIN2OCT(1100,3) returns a value of 014.
BIN2OCT(C5) converts the binary number contained in C5 to octal.
 

Notes

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