title: Ruby: convert integer to 32 bit binary number (or string)
body: <p>I want to convert a number, say <code>1</code>, into a <code>32</code> bit binary number:</p>
  
  <pre><code>00000000000000000000000000000001  
  </code></pre>
  
  <p>how can I do this to ensure the full string is of length <code>32</code>, no matter how small the number might be?</p>
  
  <p>I had a <code>sprintf</code> working for <code>8</code> bit binary, but not sure how to make it <code>32</code>.</p>