HP NonStop NS manual Decimal to Hexadecimal, Decimal Hexadecimal, Decimal Value Hexadecimal Value

Models: NonStop NS

1 266
Download 266 pages 1.32 Kb
Page 251
Image 251

Converting Numbers

Decimal to Hexadecimal

Decimal to Hexadecimal

To convert a decimal number to a hexadecimal number:

1.Divide the decimal number by 16. The remainder of this first division becomes the least significant (rightmost) digit of the hexadecimal value. If the remainder exceeds 9, convert the 2-digit remainder to its hexadecimal letter equivalent. Use this table for conversion.

Decimal Hexadecimal

10A

11B

12C

13D

14E

15F

2.Divide the quotient from Step 1 by 16, and use the remainder of this next division as the next digit (to the left) of the hexadecimal value (converting 2-digit remainders as necessary). Continue to divide the quotients by 16 until the decimal number is exhausted. The remainder from the last division is the most significant (leftmost) digit of the hexadecimal value.

Example

Convert the decimal value 47632 to its hexadecimal equivalent. (In this example, the symbol “/” indicates division.)

Step

Division

 

Quotient

Remainder

1.

47632/16

=

2977

0

2.

2977/16

=

186

1

3.

186/16

=

11

10 = A

4.

11/16

=

0

11 = B

remainder = least significant (rightmost) digit

remainder = most significant (leftmost) digit

The result is:

Decimal Value Hexadecimal Value

47632%HBA10

HP Integrity NonStop NS-Series Operations Guide529869-005

D-9

Page 251
Image 251
HP NonStop NS manual Decimal to Hexadecimal, Decimal Hexadecimal, Decimal Value Hexadecimal Value