title: Quickest way to check for (different) set bits in more integers
body: <p>If I want to check if a specific bit is set, then a simple and quick code (in my opinion) is</p>
  <pre><code>bool setbit(int number, int position)
  { 
    return ((number) &amp; (1 &lt;&lt; position)) != 0
  }
  </code></pre>
  <p>Now what if I had two integers and wanted to check 2 bits in each of them (the 4 positions will always be different)? The function should return true if all of them are set on the specified positions.</p>
  <p>Is there a better way than calling the shown function 4 times?</p>