De-Morgan’s Theorems
De-Morgan’s theorems are extremely useful in simplifying expressions in which a product or sum of variables is inverted. The two theorems are:
- (i) The first De-Morgan’s theorem may be stated as under:
When the OR sum of two variables is inverted, this is equal to inverting each variable individually and then ANDing these inverted variables i.e., \[\overline{(A + B)}=\overline{A} · \overline{B}\]
In this expression, \(A\) and \(B\) are the two variables. The L.H.S. is the complement of the OR sum of the two variables. The R.H.S. is the AND product of individual inverted variables.
- (ii) The second De-Morgan’s theorem may be stated as under:
When the AND product of two variables is inverted, this is equal to inverting each variable individually and then ORing them i.e., \[\overline{(AB)}= \overline{A} + \overline{B}\] In this expression, \(A\) and \(B\) are the two variables. The L.H.S. is the complement of the AND product of the two variables. The R.H.S. is the OR sum of the individual inverted variables.
Operator Precedence
The operator precedence for evaluating a Boolean expression is
- (1) parenthesis
- (2) NOT
- (3) AND and
- (4) OR.
In other words, the expression inside the parentheses must be evaluated before all other operations. The next operation that holds precedence is the complement, then follows the AND, and finally the OR.
For example, consider the Boolean expression : \(A + \overline{B}.(C + D)\)
The sequence of operations will be :
- (i) The expression inside the parentheses (i.e. \(C + D\)) will be evaluated first.
- (ii) Then \(B\) will be evaluated.
- (iii) Then the results of the two (i.e. \(B\) and \(C + D\)) will be ANDed.
- (iv) Finally, the result of the product will be ORed with \(A\).