title: Logical, arithmetical bitwise shifts
body: <p>Seeking to clarify something.</p>
  
  <p>It is my understanding that with regard to arithmetical, logical bitwise shifts:</p>
  
  <ol>
  <li><code>&lt;&lt;</code> work the same for both</li>
  <li><code>&gt;&gt;</code> shifts differ in that logical shift will always pad byte with 0, whereas arithmetical shift will pad it with the sign bit.</li>
  </ol>
  
  <p>How can I differentiate this using C? </p>
  
  <p>From what I understand, actual operators are the same <code>&lt;&lt;</code>,<code>&gt;&gt;</code></p>
  
  <p>How would command differ between:</p>
  
  <pre><code>int i=1;
  printf ("%d\n", i &gt;&gt; 1); // logical shift
  
  int j=1;
  printf ("%d\n", j &gt;&gt; 1); // arithmetical shift
  </code></pre>
  
  <p>Please let me know,</p>