Converting Numbers

Octal to Decimal

Octal to Decimal

To convert an octal number to a decimal number:

1.Starting from the right, multiply the least significant (rightmost) octal digit by the first placeholder value. Moving towards the left, multiply each new octal digit by its corresponding placeholder value until the octal number is exhausted.

To establish placeholder values, the first placeholder value on the far right is 1. Then for each new placeholder value to the left, multiply the value to the right by 8.

2.Add the results of the multiplications in Step 1.

Example

Convert the octal value 1375 to its decimal equivalent. (In this example, the symbol “*” indicates multiplication.) Refer to Figure D-2.

Figure D-2. Octal to Decimal Conversion

Placeholder

...

4096

512

64

 

8

 

1

 

 

values

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Octal number

...

 

1

3

 

7

 

5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5 * 1

= 5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7 * 8

 

 

= 56

 

 

 

 

 

 

 

 

 

 

 

 

= 192

 

 

 

 

 

3 * 64

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

= 512

 

 

 

1 * 512

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

765

CDT 608.CDD

1.Take the rightmost octal digit and multiply it by the rightmost placeholder value.

2.Moving to the left, take the next octal digit and multiply it by the next placeholder value. Continue to do this until the octal number has been exhausted.

3.Add the multiplied values together. The result is:

Octal Value

Decimal Value

%1375

765

HP Integrity NonStop NS-Series Operations Guide529869-005

D-4

Page 246
Image 246
HP NonStop NS manual Octal to Decimal, Octal Value Decimal Value 1375 765