<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><br>Thanks Stephen for your response. <br>With the help of #haskell I was actually able to find my answer:<br><br>import Char<br>import Numeric<br>import Data.Bits<br>import Data.Binary.Put<br>import Data.Binary.IEEE754<br>import qualified Data.ByteString.Lazy as LBS<br><br>main = do putStrLn . show $ map getBits (LBS.unpack . runPut $ putFloat64be 4.123)<br><br>getBits i = showIntAtBase 2 (chr . (48+)) i ""<br><br><br>--- On <b>Fri, 12/11/09, Stephen Tetley <i>&lt;stephen.tetley@gmail.com&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Stephen Tetley &lt;stephen.tetley@gmail.com&gt;<br>Subject: Re: [Haskell-beginners] Printing the bits of an Int|Double<br>To: "M Xyz" &lt;functionallyharmonious@yahoo.com&gt;<br>Cc: beginners@haskell.org<br>Date: Friday, December 11, 2009, 9:29
 AM<br><br><div class="plainMail">Further...<br><br>If you need double precision you might have to do it yourself.<br><br>In absence of comments in the code I posted, the algorithm I used for<br>single precision is from here:<br><br><a href="http://www.utdallas.edu/%7Ecantrell/ee6481/lectures/float_comp.pdf" target="_blank">http://www.utdallas.edu/~cantrell/ee6481/lectures/float_comp.pdf</a><br><br>Eventually I'll get around to double precision, but not soon.<br><br>Best wishes<br><br>Stephen<br></div></blockquote></td></tr></table><br>