Does any one recognize this binary data storage format

Calvin Spealman ironfroggy at gmail.com
Wed Aug 10 13:05:32 EDT 2005


On 8/10/05, Grant Edwards <grante at visi.com> wrote:
> On 2005-08-10, John Machin <sjmachin at lexicon.net> wrote:
> 
> >>>>Perhaps the one bit is an exponent -- some kind of floating point
> >>>>based format?  That matches the doubling of all digits.
> >>>
> >>>That would just be sick.  I can't imagine anybody on an 8-bit
> >>>CPU using FP for a phone number.
> 
> >>  >>> double_binary_lehex_to_double('000000806a6e4941')
> >>  3333333.0
> >>  >>> double_binary_lehex_to_double('000000806a6e5941')
> >>  6666666.0
> >>  >>> double_binary_lehex_to_double('0000108777F9Fc41')
> >>  7777777777.0
> >>
> >> ;-)
> >
> > Well done, Scott & Bengt!!
> > I've just verified that this works with all 12 corrected examples posted
> > by the OP.
> >
> > Grant, MS-DOS implies 16 bits at least;
> 
> You're right.  For some reason I was thinking you had said CP/M.
> 
> > and yes there was an FPU (the 8087).
> 
> I never met an MS-DOS box that had an 8087 (though I did write
> firmware for an 8086+8087 fire-control computer once upon a
> time).
> 
> > And yes there are a lot of sick people who store things as
> > numbers (whether integer or FP) when the only arithmetic
> > operations that can be applied to them stuff them up mightily
> > (like losing leading zeroes off post-codes, having NEGATIVE
> > tax file numbers, etc) and it's still happening on the best
> > OSes and 64-bit CPUS. Welcome to the real world :-)
> 
> I've been in the real world for a long time, and the dumb
> things people (including myself) do still surprise me.
> 
> --
> Grant Edwards                   grante             Yow!  Hello, GORRY-O!! I'm
>                                   at               a GENIUS from HARVARD!!
>                                visi.com
> --
> http://mail.python.org/mailman/listinfo/python-list
> 

Original Poster should send this off to thedailywtf.com



More information about the Python-list mailing list