title: Convert a 32bit integer into 4 bytes of data in javascript
body: <p>I was asked to convert the integers to 32-bit binary numbers.
  So is used <code>integer.toString(2)</code> and got the required value in 32-bit binary format of 0'sand 1's. But actually what I was asked to do is convert the integer into 4 bytes of data.
  I am unable to get the output as suggested. I have used <code>integer.toString(8)</code>, <code>integer.toString(16)</code>. but of no use.</p>
  
  <p>Example:</p>
  
  <pre><code> num=1065489844 
   num.toString(2) //Output: 111111100000100001010110110100
   num.toString(8) //Output: 7740412664
  </code></pre>
  
  <p>Please let me know, where I am lacking.</p>