HP (Hewlett-Packard) NS-series Network Card User Manual


 
Converting Numbers
HP Integrity NonStop NS-Series Operations Guide—529869-005
D-3
Binary to Decimal
Binary to Decimal
To convert a binary number to a decimal number:
1. Starting from the right, multiply the least significant (rightmost) binary digit by the
first placeholder value. Moving towards the left, multiply each new binary digit by
its corresponding placeholder value until the binary 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 2.
2. Add the results of the multiplications in Step 1.
Example
Convert the binary value 11011 to its decimal equivalent. (In this example, the symbol
“*” indicates multiplication.) Refer to Figure D-1.
1. Take the rightmost binary digit and multiply it by the rightmost placeholder value.
2. Moving to the left, take the next binary digit and multiply it by the next placeholder
value. Continue to do this until the binary number has been exhausted.
3. Add the multiplied values together. The result is:
Figure D-1. Binary to Decimal Conversion
Binary Value Decimal Value
%B11011 27
607CDT .CDD
1 * 16
1 * 8
0 * 4
1 * 2
1 * 1
= 1
= 0
= 8
= 16
27
Placeholder
values
Binary number
...
64 32 16
8421
...
11011
= 2