title: Using bitmasks to determine if 2 or more booleans are set
body: <p>Assume I have the following booleans:</p>
  
  <pre><code>var a;
  var b;
  var c;
  var d;
  var e;
  </code></pre>
  
  <p>I don't care which specific ones are true, or false, just that at least 2 (or more) are true.</p>
  
  <p>Would, or Can I use a bitmask (or generate one from these vars) to determine this, instead of having to run every permutation like this:</p>
  
  <p><code>if (a or b) || (a or c) || (a or d) || (a or e) || (b or c) || (b or d) || (b or e) || (c or d) || (c or e) || (d or e)</code>?</p>
  
  <p><strong>(edit: correct example)</strong></p>
  
  <p><code>if (a and b) || (a and c) || (a and d) || (a and e) || (b and c) || (b and d) || (b and e) || (c and d) || (c and e) || (d and e)</code>?</p>
  
  <p>Ta.</p>