title: Logic to test that 3 of 4 are True
body: <p>I want to return <code>True</code> if and only if 3 out of 4 boolean values are true.</p>
  
  <p>The closest I've gotten is <a href="https://www.wolframalpha.com/input/?i=(x+xor+y)+xor+(a+xor+b)+truth+table" rel="noreferrer"><code>(x ^ y) ^ (a ^ b)</code></a>:</p>
  
  <p><img src="https://i.stack.imgur.com/X6XCi.gif" alt=""></p>
  
  <p>What should I do?</p>