bit manipulation
<p>I am playing around with bits trying to get a sound understanding of it and I came across this problem. I am setting the sixth bit in the char to a 1 and I am trying to find out if the it actually being set to a 1. It's giving me a wrong answer. </p>

<pre><code>int main(int argc, char** argv) { 
    unsigned char a=0;
    a=a | (1&lt;&lt;6);
    int b=a &amp;(1&lt;&lt;6);
    cout&lt;&lt; b;
    return 0;
}
</code></pre>

<p>It's giving me a result of 64 rather than 1. Why?</p>
