OCT2BIN (octal number to binary number)

<< Click to Display Table of Contents >>

OCT2BIN (octal number to binary number)

Syntax:

OCT2BIN(Number [, Digits])

Description:

This converts the given octal number (base 8) to a binary number (base 2).

Number is the number to be converted.

Negative numbers must be represented in the 32-bit two's complement (see last example).

The permissible value range for Number is (in octal notation):

20000000000 ≤ Number ≤ 17777777777

This corresponds in decimal notation to:

-2,147,483,648 ≤ Number ≤ 2,147,483,647

The optional argument Digits lets you specify the number of places to be displayed. If omitted, PlanMaker automatically determines the required number of places.

Digits must be greater than zero. Digits should be an integer. If this is not the case, PlanMaker automatically truncates the decimal places.

If Digits are less than the minimum number of places required to display the number, the function returns a #NUM error value.

If Number is negative, the result is represented in 32-bit two's complement; the Digits argument is ignored in this case.

Example:

OCT2BIN("52") returns 101010

OCT2BIN("52", 8) returns 00101010

OCT2BIN("52", 2) returns the #NUM! error value because this number cannot be represented with fewer than 6 binary digits

OCT2BIN("37777777726") returns 11111111111111111111111111010110 (negative value)

See also:

BIN2OCT, OCT2DEC, OCT2HEX