Hobbies And Interests
Home  >> Science & Nature >> Science

What Is a Boolean Expression?

A Boolean expression is an algebraic expression that results in one of two possible values, 1 ("true") or 0 ("false"), known as Boolean values. Boolean logic forms the basis of calculations in modern binary, or base two, computer systems. You can use a system of Boolean expressions to represent any electronic computer circuit.
  1. Boolean Operators

    • Boolean expressions consist of sequence of 0s, 1s and variable names -- known as literals -- separated by the Boolean operators AND, OR, NOT and EXCLUSIVE OR. AND is true if, and only, if both sides of the expression are true. OR is true if either side of the expression is true or both sides are true. NOT changes true to false and vice versa. EXCLUSIVE OR is true if either side of the expression is true, but not both sides. Each Boolean operator accepts a pair of Boolean inputs and produces a single Boolean output.

    Operator Precedence

    • If a single Boolean expression contains more than one Boolean operator, the result of the expression depends on the priority, or precedence, of the operators. The NOT operator takes precedence over the AND operator, which, in turn, takes precedence over the OR operator. If two Boolean operators with the same precedence lie next to each other in Boolean expression, you must evaluate them from left to right. You can, however, use parentheses or brackets to override the usual precedence. In the Boolean expression A•B + C, usual operator precedence dictates that AND (•) takes precedence over OR (+), so the expression would actually be evaluated as (A•B) + C. If you wanted to change the order of precedence, you could explicitly include parentheses to make the expression A•(B + C).

    Simplification

    • You can transform one Boolean expression into a simpler, but equivalent expression -- that is, an expression with fewer variables or terms -- by applying certain properties, or laws, that describe how different variables relate to each other. The so-called commutative property, for example, states that you can reverse the order of variables that are added or multiplied without changing the result of the expression. Similarly, the associative property states that you can group together, or associate, variables that are added or multiplied without brackets, without changing the result of the expression.

    Practical Use

    • The simplification, or minimization, of Boolean expressions is important for reducing electrical circuits to the minimum number of components so that they're more reliable and cheaper to manufacture. Electrical designers can translate the logic of an electrical circuit into Boolean expressions, simplify the expressions algebraically and translate the expressions back into circuit form. The simplification of logic circuits is, in fact, the most practical use of Boolean expressions.


https://www.htfbw.com © Hobbies And Interests