title: How to simplify these compound logical expression?
body: <p>How to simplify these compound logical expressions?</p>
  
  <pre><code>!((x &lt;= 5) &amp;&amp; (y == 10) &amp;&amp; (z &lt; 5))  // 1
  !(x == 10) || !((y == 5) || (z &lt; 0)) // 2
  </code></pre>
  
  <p>I have read the rule for simplification, but I am not understanding what to do with <code>==</code>. </p>
  
  <p>This is from "Programing in ANSI C" written by E Balagurasy
  While designing decision statements, we often come across a situation where the logical NOT operator is applied to a compound logical expression, like !(x&amp;&amp;y || !z). However,a positive logic is always easy to read and comprehend than a negative logic. In such cases, we may apply what is known as De Morgan's rule to make the total expression positive.The rule is as follows: "Remove the parentheses by applying the NOT operator to every logical expression component, while complementing the relational operators." Example: !(x&amp;&amp;y || !z) becomes !x || !y &amp;&amp; z. </p>