title: What is the purpose of bit shifting?
body: <p>I came across the below lines in code</p>
  <pre><code>unsigned char A = 0xB9;
  unsigned char B = 0x91;
  unsigned char C = A &lt;&lt; 3; // shift bits in A three bits to the left.
  unsigned char D = B &gt;&gt; 2; // shift bits in B two bits to the right.
  </code></pre>
  <p>I know that it's bit-shifting, but what purpose does it serve and when should one use it?</p>