NonStop S-Series Operations Guide (G06.24+)
Converting Numbers
HP NonStop S-Series Operations Guide—522459-007
D-8
Decimal to Octal
Decimal to Octal
To convert a decimal number to an octal number:
1. Divide the decimal number by 8. The remainder of this first division becomes the 
least significant (rightmost) digit of the octal value.
2. Divide the quotient from Step 1 by 8, and use the remainder of the next division as 
the next digit (to the left) of the octal value. Continue to divide the quotients by 8 
until the decimal number is exhausted. The remainder from the last division is the 
most significant (leftmost) digit of the octal value.
Example
Convert the decimal value 358 to its octal equivalent. (In this example, the symbol “/” 
indicates division.) 
The result is: 
Step Division Quotient Remainder
1. 358/8 = 44 6 remainder = least significant (rightmost) 
digit
2. 44/8 = 5 4
3. 5/8 = 0 5 remainder = most significant (leftmost) 
digit
Decimal Value Octal Value
358 %546










