title: Quickly Converting uint32_t to binary
body: <p>The main problem I'm having is to read out values in binary in C++ (python had some really quick/easy functions to do this)</p>
  
  <p>I just need the same. So at the moment I have:</p>
  
  <pre><code>ValWord&lt; uint32_t&gt; data1=//[SOME READ FUNCTION]
  </code></pre>
  
  <p>When I use <code>cout &lt;&lt; data1;</code> It gives me a number e.g <code>2147581953</code></p>
  
  <p>I want this to be in binary and eventually each "bit" needs to be in its own bin including all '0's e.g:</p>
  
  <pre><code>for (int i = 31; i &gt;= 0; i--) {
        cout &lt;&lt; binary[i];
      }  
  </code></pre>
  
  <p>Would give me this 32 bit long binary number. When I've had it as a straight forwward int, I've used:</p>
  
  <pre><code>    int data[32];
      bitset&lt;32&gt;(N) = data1;
  
      for(int i=31; i &gt;=0; i--) {
        data[i]=(bitset&lt;32&gt;(N[i]).to_ulong());
      }
  
      for (int i = 31; i &gt;= 0; i--) {
        cout &lt;&lt; data[i];
      }  
  </code></pre>
  
  <p>But this just gives me error messages. Any ideas?</p>