Leading the way in Microsoft Office Development
 Home|Excel|Word|PowerPoint|Consultancy|Feedback|Contact 
 Microsoft Excel > Functions > Engineering > BIN2OCT

 

BIN2OCT(number, places)

 
 Returns the number converted from binary to octal.

 number The binary number you want to convert.
 placesThe number of characters to use.

 REMARKS
 
  • This function is only available if you have the Analysis ToolPak add-in installed.
     
  • The "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.
     
  • If "number" contains more than 10 characters, then #NUM! is returned.
     
  • If "number" is not a valid binary number, or if number contains more than 10 characters (10 bits), then #NUM! is returned.
     
  • If "number" < 0 then two's-complement notation is used to represent the number.
     
  • If "number" < 0, then "places" is ignored and a 10-character octal number is returned.
     
  • If "places" is less than the number of characters needed, then #NUM! is returned.
     
  • If "places" < 0, then #NUM! is returned.
     
  • If "places" is not an integer, it is truncated.
     
  • If "places" is left blank, then the minimum number of characters necessary.
     
  • If "places" is not numeric, then #VALUE! is returned.
     
  • The "places" is useful for padding the return value with leading 0s.

     EXAMPLES
     
     A
    1=BIN2OCT(1001,3) = 011
    2=BIN2OCT(1100100) = 144
    3=BIN2OCT(1111111111) = 7777777777
    4=BIN2OCT(123456789012) = #NUM!
    5=BIN2OCT("some text") = #NUM!
     

     Functions - B | Index - B | Office Online 

     Copyright © 2004-2007 Better Solutions Limited. All Rights Reserved.Top