flat assembler
Message board for the users of flat assembler.

Index > Main > How to read raw binary floating point?

Author
Thread Post new topic Reply to topic
me239



Joined: 06 Jan 2011
Posts: 200
me239
Hello everyone, recently I've been trying to read a file stored in pure binary format with no header or any other format. The only problem I've had is that the file is stored in floating point. I've been searching all over the Internet for a solution, but all results are for HLL's and commonly refer to IEEE format. The program says it's in pure binary and Little endian. How do I convert it to integer?
Post 10 Mar 2011, 20:49
View user's profile Send private message Reply with quote
b1528932



Joined: 21 May 2010
Posts: 287
b1528932
give the sample of this file, first some bytes if you can.
Post 11 Mar 2011, 01:36
View user's profile Send private message Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler
Integer or floating point? Single or double precision? You need to know the format. Single: 24 bit significand, 8 bit exponent; Double: 53 bit significand, 11 bit exponent. For example: 8 can be represented in single precision as both 0000 0000 0000 0000 0000 1000 0000 0001 or 0000 0000 0000 0000 0000 0010 0000 0011, but it would be stored backwards in little endian.
Post 13 Mar 2011, 00:28
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.