M68HC08RG/AD
MOTOROLA
M68HC08 Family Reference Guide
19
Decimal to Hexadecimal Conversion
To convert a decimal number (up to 65,535
10
) to hexadecimal, find the largest
decimal number in
Table 5
that is less than or equal to the number you are
converting. The corresponding hexadecimal digit is the most significant
hexadecimal digit of the result. Subtract the decimal number found from the
original decimal number to get the remaining decimal value. Repeat the
procedure using the remaining decimal value for each subsequent
hexadecimal digit.
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
.
..