Syntax:
HEX2OCT(Number [, Digits])
Description:
This converts the given hexadecimal number (base 16) to an octal number (base 8).
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 hexadecimal notation):
80000000 ≤ Number ≤ 7FFFFFFF
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, Calculate determines the number of required places automatically.
Digits must be greater than zero. Digits should be an integer. If this is not the case, Calculate 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:
HEX2OCT("2A") returns 52
HEX2OCT("2A", 4) returns 0052
HEX2OCT("2A", 1) returns the error value #NUM! because this number cannot be represented with fewer than 2 octal digits
HEX2OCT("FFFFFFD6") returns 37777777726 (negative value)
See also: