Odd Request: HEX Editing

lhgpoobaa

Illustrious
Dec 31, 2007
14,462
1
40,780
This is a request to all you hex editors out there...

In my day ive done some hex editing, nothing major.

I know that basic integers are stored as a conveted hex number, split into 2 letter blocks and order reversed.

i.e.
30000 = 2710 = 10 27

But how are decimals stored, namely something like:
129.100006

???

please help


<b>I am not a AMD fanboy.
I am not a Via fanboy.
I am not a ATI fanboy.
I AM a performance fanboy.
And a low price fanboy. :smile:
Regards,
Mr no integrity coward.</b>
 

goloap

Distinguished
Sep 9, 2001
293
1
18,795
Your getting in a lot of headache if you work with floating point numbers. They actually can be stored in many ways but the classic one (and the one Pentium uses I beleive) is according to the IEEE 754. I won't start explaining it to you here (quite long), but you can look it up on the web there are planny of info on it.

In ancient times they had no statistics so they had to fall back on lies
 

kinetic_tw

Distinguished
May 29, 2003
555
0
18,980
Out of boredom and curiousity, what process are you using to get the result of 2710? Standard decimal to hex conversion of the number 30000 gives me 7530 h.
 
G

Guest

Guest
Captain Obvious to the rescue!

10 27 is 10000.
A simple case of fingers being too fast for the brain.

In anycase i solved his contundurum.
Was using a proggie called hex workshop, and i worked out what all the conversions mean.

For simple integer to hex one can use 'unassigned short' or 'unassigned long' but for decimal one needs to select 'float(32bit)'.

Simple solution!

<b><font color=red>Captain Obvious To The Rescue!!!</font color=red></b>
 

goloap

Distinguished
Sep 9, 2001
293
1
18,795
Sure when using a program that does the conversion for you, it is always easy. But, it is also nice to know how to do the conversion by hand. Just to remember good times.

In ancient times they had no statistics so they had to fall back on lies