Logical Operators’ Precedence

The following shows the precedence of logical operators:

  • \(\sim\) or \(\neg\) (Negation)
  • \(\land\) and \(\lor\), need parenthesis when both are present
  • \(\rightarrow\) and \(\leftrightarrow\), need parenthesis when both are present
Links to this page
  • Logic
  • Conditional Statement

    For example: If primate is mammal, then human is mammal. This can be denoted using logical operator#, \(p \rightarrow q\). \(p\) is called a hypothesis or antecedent whereas \(q\) is called the conclusion or consequent. The hypothesis of the statement could be false, however it doesn’t imply that the statement is false. On the contrary, the conclusion could still be true, which we call it as vacuously true or true by default. This could be seen from its 202205061151#. If the hypothesis is true, then the conclusion must be true, otherwise it is a false statement.

  • Compound Statement

    Compound statement is a #202204281244 that consists of at least one primitive logical operator#. It expresses the relationship between different statements or the statement itself. For example: “is not \(p\)”, “\(p\) and \(q\)”, “\(p\) or \(q\) or both” and “\(p\) or \(q\) but not both”.

  • Boolean Expression

    A Boolean Expression is an expression which consists of Boolean variables (take one of only two values) and connectives#. The Boolean variables usually coming from the #input/output table.

#logic