title: Java - Circular shift using bitwise operations
body: <p>I am wondering how to implement a <strong><em>circular</strong> right shift</em> by k of the bitstring represented by the <code>int</code> bits.</p>
  
  <pre><code>public int rtCircShift(int bits, int k)
  {
      return bits &gt;&gt; k;
  }
  </code></pre>
  
  <p>All this code does is <em>return 0</em>, how can I make it a circular shift?</p>