title: When to use Shift operators << >> in C#?
body: <p>I was studying shift operators in C#, trying to find out
  when to use them in my code.</p>
  
  <p>I found an answer but for Java, you could:</p>
  
  <p><em>a) Make <strong>faster</strong> integer multiplication and division operations:</em></p>
  
  <blockquote>
    <p>*4839534 * 4* can be done like this:
    <em>4839534 <strong>&lt;&lt; 2</em></strong></p>
  </blockquote>
  
  <p>or </p>
  
  <blockquote>
    <p><em>543894 / 2</em> can be done like this: <em>543894 <strong>>> 1</em></strong></p>
  </blockquote>
  
  <p><em>Shift operations much more faster than multiplication for most of processors.</em></p>
  
  <p><em>b) Reassembling byte streams to int values</em></p>
  
  <p><em>c) For accelerating operations with graphics since Red, Green and Blue colors coded by separate bytes.</em></p>
  
  <p><em>d) Packing small numbers into one single long...</em></p>
  
  <hr>
  
  <p>For b, c and d I can't imagine here a real sample. </p>
  
  <p>Does anyone know if we can accomplish all these items in C#? 
  Is there more practical use for <em>shift operators</em> in C#?</p>