title: Converting a floating point to its corresponding bit-segments
body: <p>Given a Ruby <code>Float</code> value, e.g.,</p>
  
  <pre><code>f = 12.125
  </code></pre>
  
  <p>I'd like to wind up a 3-element array containing the floating-point number's sign (1 bit), exponent (11 bits), and fraction (52 bits). (Ruby's floats are the IEEE 754 double-precision 64-bit representation.)</p>
  
  <p>What's the best way to do that? Bit-level manipulation doesn't seem to be Ruby's strong point.</p>
  
  <p>Note that I want the bits, not the numerical values they correspond to. For instance, getting <code>[0, -127, 1]</code> for the floating-point value of <code>1.0</code> is not what I'm after -- I want the actual bits in string form or an equivalent representation, like <code>["0", "0ff", "000 0000 0000"]</code>.</p>