View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default Hexadecimal to Decimal (and vice versa)

You'll have to explain why you think that those numbers are incorrect, and
how you get your alternative figures.

The values which HEX2DEC and DEC2HEX give agree with what the Microsoft
calculator's conversions give, and you can also check by converting each
digit at a time and adding up the values of the digits.

Taking just part of the problem, you've got hex 368847DD. Well, hex
30000000 is 3 * 16^7, which is 805306368, so it wouldn't make sense to get
5408931293 for the whole number 368847DD.
If you want to add up the total
368847DD comes to
3 * 16^7 +
6 * 16^6 +
8 * 16^5 +
8 * 16^4 +
4 * 16^3 +
7 * 16^2 +
13 * 16^1 +
13 * 16^0
hence the total of 914900957
--
David Biddulph

"Toria" wrote in message
...
Hello,

I know the formulas of HEX2DEC and DEC2HEX. I think my problem is not
really knowing about the math.

I received a hex and dec version of a device version:
Hex: 368847DD
Dec: 5408931293

When I do the above formulas in Excel, the result is different. If I take
the Hex version, 368847DD, and do HEX2DEC, I get 914900957 when it should
be
5408931293.

If I take the Dec version, 5408931293, and do DEC2HEX, I get 14265BDDD
when
it should be 368847DD.

I feel like I'm missing something very obvious but can't figure it out.
Help is much appreciated!