title: Dont understand: (x>>24)&0xff
body: <p>Hey I am working with image in JAVA (sobel operator) and I don't understand what some lines of code mean.</p>
  
  <pre><code>int p = img.getRGB(x,y);
  int a = (p&gt;&gt;24)&amp;0xff;
  int r = (p&gt;&gt;16)&amp;0xff;
  int g = (p&gt;&gt;8)&amp;0xff;
  int b = p&amp;0xff;
  p = (a&lt;&lt;24) | (avg&lt;&lt;16) | (avg&lt;&lt;8) |avg;
  </code></pre>
  
  <p>So could someone explain what these lines mean?</p>
  
  <pre><code>(p&gt;&gt;24)&amp;0xff
  p = (a&lt;&lt;24) | (avg&lt;&lt;16) | (avg&lt;&lt;8) |avg;
  </code></pre>