title: how to output an int in binary?
body: <pre><code>int x = 5;
  cout&lt;&lt;(char)x;
  </code></pre>
  
  <p>the code above outputs an int x in raw binary, but only 1 byte. what I need it to do is output the x as 4-bytes in binary, because in my code, x can be anywhere between 0 and 2^32-1, since</p>
  
  <pre><code>cout&lt;&lt;(int)x;
  </code></pre>
  
  <p>doesn't do the trick, how would I do it?</p>