- posted
17 years ago
Converting Hex to Decimal
- posted
17 years ago
Can anyone reccomend a site that explains how to do this?
Cheers
- posted
17 years ago
Thanks
Had already done a google search using virtually the same words, and had found nothing of any use.
This one seems good though.
- posted
17 years ago
Still makes no sense to me.
I can do it by converting into bianry & then to decimal, but surely there's a quicker way?
- posted
17 years ago
Looking at this from the IP-address point of view (ranging from 0 to 255, or
00000000 to 11111111, or 0 to FF)....The hex comes in "pairs" (like 9A), so counting the decimal (10-based) from the hex (16-based) can be done as follows:
(16*9)+(1*A)=154
For refreshing of memory, the hex counts as 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A (=10), B (=11), C (=12), D (=13), E (=14), F (=15)
To do it again for FF (255) --> (16*15)+(1*15) --> 255
Julle
- posted
17 years ago
That is really the easiest way and in my view the quickest - octal direct to decimal used to be ok because multiples of 8 are easier to handle, but working through multiples of 16!
And given Hex was effectively invented to be a shorthand way to accurately represent 8 bit binary values without the transposition errors that could occur when writing out strings of 1s and 0s converting from hex to binary and then binary to decimal really makes the most sense.
But direct hex to decimal conversion is a deprecated excercise anyway, in the CCNA exam for example you won't find a question that requires you to do that - what you really need to know is decimal binary and binary hexadecimal.
Aubrey
- posted
17 years ago
Thanks Julle