Converting Hexadecimal to Decimal

dawks

Diamond Member
Oct 9, 1999
5,071
2
81
Basically I use DU Meter to track my uploads/downloads, and it provides a total. I've been tracking since Jan 2002 so I have a nice record of my total internet traffic.

However, last year, when I reinstalled, I did not realized they store the totals in a registry key, so the value was reset. And just recently, I guess I accidentally reset the totals again, since the 'Reset' button is selected by default, all it takes is a tap of the space bar and you're screwed.

So now I'd like to program in the actual value, but its store as a REG_BINARY value, and I have no idea how to input a simple decimal value in that format.

Any help? Heres what it looks like when I export the reg-key:

"Totals"=hex:03,3d,04,21,06,00,00,00,0f,44,eb,2f,02,00,00,00,00,00,00,00,00,00,
00,00,21,33,b4,90,b8,df,e2,40,50,6b,14,39,00,00,00,00,fe,ff,4f,1f,00,00,00,
00,00,00,00,00,00,00,00,00,00,00,00,00,40,e0,e2,40,00,00,00,00,00,00,00,00,
00,00,00,00,00,00,00,00

I think this may contain a date, a download value, an upload value, and a total combined value.

Thanks!!
 

Mark R

Diamond Member
Oct 9, 1999
8,513
16
81
Would 24.28 GiB (26.07 GB), and 8.74 GiB (9.39 GB) sound roughly right?
 

dawks

Diamond Member
Oct 9, 1999
5,071
2
81
Originally posted by: Mark R
Would 24.28 GiB (26.07 GB), and 8.74 GiB (9.39 GB) sound roughly right?


That is pretty close.. I can't verify, but that should be about right...

So how do I go about converting the values from my Excel spredsheet back to hex? :D

Thanks!
 

Mark R

Diamond Member
Oct 9, 1999
8,513
16
81
I used windows calc.

The numbers are stored as 8-byte 'words'. Each byte appears as 2 characters. The letters within each byte read left-to-right, but the bytes within each word read right-to-left.

So the 1st number converted from that list into hex is:

0000000621043d03

the 2nd is

000000022feb440f

In calc, press hex. Type the number in. Press dec and you've got your answer (in bytes).

Divide by 1,000,000,000 to get GB (gigabytes) or 1,073,741,824 to get GiB (gibibytes)
 

dawks

Diamond Member
Oct 9, 1999
5,071
2
81
Thank you, I see partially whats going on.

I've spent the last 30 minutes trying to convert the actual total transfer values from decimal back to binary. And I can get partially there.

When I convert the download total, which is (1,914,570,899), I get 6CD4AC6550AC0, which is 0c,a0,55,6c,a4,dc,6.. but I can only plug in 5 of those pairs, otherwise nothing shows in the stats, and with only 5 pairs, I get a value thats less then half of what it should be.

so this is the current one "hex:0a,be,92,65,06,00,00,00,51,73,e1,68,02,00..." and if I plug my new value in the first part there, I can only make it "hex:0c,a0,55,6c,a4,00,00,00" otherwise no values show.. why do they make this so difficult for us non programmers :D

Basically I want to plug the actual totals back in..
1,914,570,899 KB downlaoded
820,930,695 KB uploaded
2,735,501,594 KB total

danke for teh help!
 

Seeruk

Senior member
Nov 16, 2003
986
0
0
Hmmm I suck at hex (perhaps because I have never been taught it :) )

What I got was (assuming 8 byte words)

03,3d,04,21,06,00,00,00 =3614336000
0f,44,eb,2f,02,00,00,00 =1568235472000
00,00,00,00,00,00,00,00 =0
21,33,b4,90,b8,df,e2,40 =335118014418422322664
50,6b,14,39,00,00,00,00 =8010720570000
fe,ff,4f,1f,00,00,00,00 =25425579310000
00,00,00,00,00,00,00,00 =0
00,00,00,00,40,e0,e2,40 =6422422664
00,00,00,00,00,00,00,00 =0
00,00,00,00,00,00,00,00 =0

I have no doubt I am wrong - but I would like to know where I am wrong :)