wrong output code
<p>The following code gives the wrong binary output:
The input is a HEX number and the output should be a binary number.</p>

<p>It always outputs:</p>

<pre><code>0    
0    
0    
0
</code></pre>

<p>How can I change it so it outputs the right binary number?</p>

<pre><code>#include &lt;iostream&gt;

using namespace std;

int main ()
{   

int Number;
cin &gt;&gt; Number;
bool Binary[sizeof(int) * CHAR_BIT];

for(unsigned int i = 0; i &lt; sizeof(int) * CHAR_BIT; i++)
    Binary[(sizeof(int) * CHAR_BIT - 1) - i] = Number &amp; (1 &lt;&lt; i);

for(unsigned int i = 0; i &lt; sizeof(int); i++)
    std::cout &lt;&lt; Binary[i] &lt;&lt; std::endl;

system ("pause");

return 0;

}
</code></pre>
