title: Where is the 6th bit in 16-bit char value?
body: <p>There are two examples of bit switching in the book <em>Java: A Beginners Guide</em>. In both cases, the author writes about switching the 6th bit but he demonstrates it on 16 digits. Both examples use bitwise operators for changing the letter case.</p>
  
  <ol>
  <li>In the first, he operates on lower case characters: <code>'a' &amp; 65503</code> changes the char to <code>'A'</code>. It is described as switching the 6th bit off. The problem is the number <code>65503</code> equals <code>1111 1111 1101 1111</code> in binary. Hence the 11th digit/bit is switched off (he even shows the number there).</li>
  <li>The same he does for uppercase letters and bitwise OR operator: <code>'a' | 32</code> does the trick. The number 32 equals <code>0000 0000 0010 0000</code> in binary.</li>
  </ol>
  
  <p>In both cases, the change does make sense. I just don’t understand why the author writes about the 6th bit. I would understand if it was for the 11th bit or 6th pair (in that case I would expect the turning it off completely as <code>00</code> or <code>11</code>.</p>
  
  <p>Any clarification more than welcome.</p>