Method for displaying binary number [C] : <p>Not sure why, but the number being outputted is:</p>

<pre><code>101101
</code></pre>

<p>Instead of </p>

<pre><code>1011010
</code></pre>

<p>Any ideas why?</p>

<p>Here's my code:</p>

<pre><code>typedef unsigned short bitSet;

int main() {
    bitSet bits = makeBitSet();
    displayBitSet(bits);
}

bitSet makeBitSet() {
    bitSet bits = 90;
    return bits;
}

displayBitSet(bitSet bs) {
int i;
for (i = 0; i &lt; 16; i++) {
    printf("%d", ((bs &amp; (int)pow(2, (16-1))) &gt;&gt; (16-i)));
    }
}
</code></pre>
