![HP Integrity NonStop NS-series Operation Manual Download Page 250](http://html.mh-extra.com/html/hp/integrity-nonstop-ns-series/integrity-nonstop-ns-series_operation-manual_164441250.webp)
Converting Numbers
HP Integrity NonStop NS-Series Operations Guide — 529869-005
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