Archives of the TeradataForum
Message Posted: Mon, 11 Aug 2003 @ 18:23:22 GMT
Subj: | | Re: How to convert decimal to hex |
|
From: | | Janik, Robert B |
Hexadecimal is base sixteen whereas decimal is base ten. Hence,
Hex = Dec
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
A 10
B 11
C 12
D 13
E 14
F 15
10 16
11 17
...and so on.
Each position from the right to left is a power of 16, so a hex value like "ABCD" may be represented in decimal by interpreting, then
adding these numbers:
13 = 13 = hex "D"
192 = 16*12 = hex "C0"
2,816 = 16*16*11 = hex "B00"
40,960 = 16*16*16*10 = hex "A000"
------
43,981 (decimal) is therefore equal to "ABCD" hexadecimal
Without a hex calculator or an old IBM system reference summary card (know any MVS people?), this is as good as it gets.
Bob J.
|