[DECIMAL TO HEX CONVERSION METHODS]
The conversion method differs according to the range of the
number you want to convert.
(1) 0 255
(2) 256 4095
(3) 4096 65536
When in above range (1) of 0 to 255.
1) Divide the base 10 (decimal) data by 16. Set that
as
“A”.
2) Set the A portion (above the decimal point) as B.
3) Find (A B)
X
16 and set that value as C.
4) Set B as the second digit column (from left) and C as the
first digit column. (BC).
(Example)
When converting decimal number
to hexadecimal.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...(A)
3) (11.8125 11)
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4) 189 becomes
When in above range (2) of 2.56 to 4095.
1) Divide the base 10 (decimal) data by 256. Set that result as
“A”.
2) Set the A portion (above the decimal point) as B.
3) Find (A B)
X
Set that result as “c”.
4) Set the C portion (above the decimal point) as D.
5) Find (C D) 16 and set that value as E.
6) Set B as the 3rd digit column from left, D as the second
column, and E as the first digit column (BDE) h.
(Example)
When converting decimal number “2100” to hexadecimal.
2100
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3) (8.203125 8)
(Example)
4)
(3.25
3)
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6) 2100 becomes
When the hex number is
(3 4096) + (11 256) +
16) + (4 1) = 15268
l
When in above range (3) of 4096 to 65536.
1) Divide the base 10 (decimal) data by 4096. Set that result as
“A”.
2) Set the A portion
(above
the decimal point) as “B”.
3) Find (A B)
Set that result as “c”.
4) Set the C portion (above the decimal point) as “D”.
Find (C D)
X
Set that result as “E”.
6) Set the E portion (above the decimal point) as “F”.
7) Find (E F) 16. Set that result as
(Count and higher fractions as a unit
and cut away
the
rest)
8) Set B as the 4th digit column (from left), D as the third digit
column, F as the 2nd digit column and G as the 1st digit
column (BDFG) h.
(Example)
When the decimal number is “31814”
1) 31814
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3) (7.7670898 7) 4096
(C)
4)
5) (12.273436 12) x 256
(E)
7) (4.374976 4) x
(Count and higher fractions as a unit
and cut away the rest)
6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9) 31814becomes
[CONVERTING HEXADECIMAL NUMBERS TO DECIMAL
NUMBERS]
Find with the following formula when the hex number is (ABCD) h
(A
x
4096) + (B
x
256) + (C
x
16) +
x
1) = Decimal number
6-6