 Top

Logical Operators

The statements that have truth values: TRUE or FALSE, are called logical expressions or Boolean functions.
The operators used in such statements are called logical operators or sometimes Boolean operators.

We use ‘T’ or ‘1’ for TRUE value and ‘F’ or ‘0’ for FALSE value. A variable at a given point of time can have only one value, either ‘T’ or ‘F’.

 Related Calculators Logic Truth Table Calculator Calculator for Order of Operations Fraction Operations Calculator Matrix Operations Calculator

Types of Logical Operators

There are three types of logical operators written in order of precedence below:
NOT
AND
OR

Truth Table:
Truth table is used to calculate and record the value of any logical expression on the basis of the logical operators used.

NOT Operator:
NOT operator can be symbolized as a bar above the variable, for example, ‘ x’ or ‘NOT x’.
It is a unary operator. This operator produces opposite value of its operand, for if, the value is true, it will produce false and if it is false it will produce true.
The truth table for NOT operator is below.

 X NOT X 0 (FALSE) 1 (TRUE) 1 (TRUE) 0 (FALSE)

AND Operator:
AND operator can be symbolized with a dot, for example, ‘A AND B’ or ‘A . B’ or ‘A ∧ B’.
It is a binary operator. This operator works like the multiplication operator. The value will only be true with this operator if both the input values are true. If either of the two operands is false, the final value will be false.
The truth table for AND operator is given below.

 A B A ∧ B 0 0 0 0 1 0 1 0 0 1 1 1

OR Operator:
OR operator can be symbolized with a plus sign, for example, ‘A OR B’ or ‘A + B’ or ‘A ∨ B’.
It is a binary operator. This operator works like the addition operator. The value will only be false with this operator if both the input values are false. If either of two operands is true, the final value will be true. It is the negation of AND operator.
The truth table for OR operator is given below.

 A B A ∨ B 0 0 0 0 1 1 1 0 1 1 1 1

Solving Logical Expressions:
To solve logical expressions we proceed as following
1.  First solve the parentheses if any.
2.  Next solve the NOT operator.
3.  Then the AND operator.
4.  And lastly the OR operator.
Laws of Boolean Expressions:
1.   Commutative Law
A + B = B + A
A . B = B . A

2.    Associative Law
(A + B) + C = A + (B + C)
A . (B . C) = (A . B) . C

3.    Distributive Law
A . (B + C) = A . B + A . C
A + (B . C) = (A + B) . (A + C)

4.    Identity Law
A + A = A
A . A = A

5.    Redundance Law
A + A . B = A
A . (A + B) = A

6.    De Morgan’s Theorem
Bar (A + B) = Bar A . Bar B
Bar AB = Bar A + Bar B
0 + A = A; 1 + A = 1
0 . A = 0; 1 . A = A
Bar A + A = 1; Bar A A=0

Example 1: Prove that C + Bar BC = Bar B
Solution: C + Bar BC  = C + (Bar B + Bar C)  using DeMorgan's Law
= (C + Bar C) + Bar B
= 1 + Bar B = Bar B

Example 2: Prove that (A + C)(AD + A Bar D) + AC + C = A + C
Solution: (A + C)(AD + A Bar D) + AC + C
= (A + C) A (D + Bar D) + C (A + 1)
= (A + C) A + C = AA + AC + C
= A + C (A + 1) = A + C

*AP and SAT are registered trademarks of the College Board.