title: Can anyone explain why '>>2' shift means 'divided by 4' in C codes?
body: <p>I know and understand the result.</p>
  <p>For example:</p>
  <pre><code>&lt;br&gt;
   7 (decimal) = 00000111 (binary) &lt;br&gt;
  
  and 7 &gt;&gt; 2 = 00000001 (binary) &lt;br&gt;
  00000001 (binary) is same as 7 / 4 = 1 &lt;br&gt;
  So 7 &gt;&gt; 2 = 7 / 4 &lt;br&gt;
  &lt;br&gt;
  </code></pre>
  <p>But I'd like to know how this logic was created. <br>
  Can anyone elaborate on this logic? <br>
  (Maybe it just popped up in a genius' head?) <br>
  <br>
  And are there any other similar logics like this ? <br></p>