Four Types of Boolean Logic

Four Types of Boolean Logic thumbnail
Boolean expressions can evaluate only to 0 or 1.

Boolean logic was conceived by the 19th century English mathematician George Boole, who was the first person to successfully apply algebraic methods to logic. In the Boolean system, the two possible values are 0, representing false, and 1, representing true. Instead of traditional arithmetic operators, such as addition and subtraction, Boolean expressions are evaluated by a series of logical operators. The circuitry of personal computers, cellular phones and many other electrical devices is based on the principles of Boolean logic.

  1. AND Operator

    • The AND operator, or conjunction operator, performs logical conjunction on two Boolean expressions. In other words, if both Boolean expressions evaluate to true, the AND operator returns true. Otherwise, it returns false. The AND operator takes two operands, or expressions upon which the AND operation is performed, and is therefore known as a binary operator. The ampersand symbol is most commonly used to represent the AND operator on computers, so A & B represents the result of performing a logical AND operation on the Boolean values A and B, also known as the product of A and B.

    OR Operator

    • The OR operator, or disjunction operator, is also a binary operator, but performs logical disjunction on two Boolean expressions. In other words, if either Boolean expression evaluates to true, the OR operator returns true; otherwise it returns false. The plus symbol is used to represent the OR operator, so A + B represents the result of performing a logical OR operation on A and B, also known as the sum of A and B.

    XOR Operator

    • Another common binary operator used in Boolean algebra is known as the XOR operator, exclusive OR operator, or exclusive disjunction operator. The XOR operator isn’t independent of the AND and OR operators, but performs exclusive disjunction on two Boolean expressions. If either, but not both, of the expressions evaluates to true, the XOR operator returns true. If both expressions evaluate to true, or both expressions evaluate to false, the XOR operator returns false.

    NOT Operator

    • The NOT operator -- also known as the inversion operator, logical complement operator, or negation operator -- takes just one operand, rather than two, and is known as a unary operator. The NOT operator performs logical negation on a Boolean expression or, in other words, returns the logical opposite of the expression it evaluates. If the expression evaluates to true, the NOT operator returns false, and vice versa. In a computer programming environment, the NOT operator is often represented by the exclamation mark symbol or the tilde symbol.

Related Searches:

References

  • Photo Credit Ablestock.com/AbleStock.com/Getty Images

Comments

Related Ads

Featured