what is purpose of bit shifting?
<p>In C++, sometimes, I see code like this:</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 I don't know what is its purpose and when we should use it? Can anyone explain?</p>
