Explore Related Concepts

definition of boolean operators

Best Results From Wikipedia Yahoo Answers Encyclopedia Youtube

From Wikipedia

Introduction to Boolean algebra

Boolean algebra, developed in 1854 by George Boole in his book An Investigation of the Laws of Thought, is a variant of ordinary elementary algebra. Boolean algebra differs from ordinary algebra in three ways: in the values that variables may assume, which are of a logical instead of a numeric character, prototypically 0 and 1; in the operations applicable to those values; and in the properties of those operations, that is, the laws they obey. Applications include mathematical logic, digital logic, computer programming, set theory, and statistics.


Whereas elementary algebra deals mainly with real numbers, Boolean algebra deals with the values 0 and 1. These can be thought of as two integers, or as the truth values false and true respectively. In either case they are called bits or binary digits, in contrast to the decimal digits 0 through 9.

Boolean algebra also deals with other values on which Boolean operations can be defined, such as sets or sequences of bits. However, Boolean algebra is unlike many other systems of algebra in that it obeys exactly the same laws (equational properties), neither more nor fewer, no matter which of these other values are employed. Much of the subject can therefore be introduced without reference to any values besides 0 and 1. Other values are treated in the section on Boolean algebras.


Basic operations

Some operations of ordinary algebra, in particular multiplication xy, addition x+y, and negation -x, have their counterparts in Boolean algebra, respectively the Boolean operations AND, OR, and NOT, also called conjunctionx∧y, disjunctionx∨y, and negation or complement¬x or sometimes !x. Some authors use instead the same arithmetic operations as ordinary algebra reinterpreted for Boolean algebra, treating xy as synonymous with x∧y and x+y with x∨y.

Conjunctionx∧y behaves on 0 and 1 exactly as multiplication does for ordinary algebra: if either x or y is 0 then x∧y is 0, but if both are 1 then x∧y is 1.

Disjunctionx∨y works almost like addition, with 0∨0 = 0 and 1∨0 = 0∨1 = 1. However there is a difference: 1∨1 is not 2 but 1.

Complement resembles ordinary negation in that it exchanges values. But whereas in ordinary algebra negation interchanges 1 and -1, 2 and -2, etc. while leaving 0 fixed, in Boolean algebra complement interchanges 0 and 1. One can think of ordinary negation as reflecting about 0, and Boolean complement as reflecting about the midpoint of 0 and 1. Complement can be defined arithmetically as ¬x = 1−x because the latter maps 0 to 1 and vice versa, the behavior of ¬x.

In summary the three basic Boolean operations can be defined arithmetically as follows.

Alternatively the values of x∧y, x∨y, and ¬x can be expressed without reference to arithmetic operations by tabulating their values with truth tables as follows.

For the two binary operations ∧ and ∨ the truth tables list all four possible combinations of values for x and y, one per line. For each combination the truth tables tabulate the values of x∧y and x∨y. The truth values of ¬x are tabulated similarly except that only two lines are needed because there is only one variable.

Yet another way of specifying these operations is with equations explicitly giving their values.

Derived operations

We have so far seen three Boolean operations. We referred to these as basic, meaning that they can be taken as a basis for other Boolean operations that can be built up from them by composition, the manner in which operations are combined or compounded. Here are some examples of operations composed from the basic operations.

These definitions give rise to the following truth tables giving the values of these operations for all four possible inputs.

The first operation, x â†’ y, is called material implication. If x is true then the value of x â†’ y is taken to be that of y. But if x is false then we ignore the value of y; however we must return some truth value and there are only two choices, so we choose the value that entails less, namely true. (Relevance logic addresses this by viewing an implication with a false premise as something other than either true or false.)

The second operation, x âŠ• y, is called exclusive orto distinguish it from disjunction as the inclusive kind. It excludes the possibility of both x and y. Defined in terms of arithmetic it is addition mod 2 where 1 + 1 = 0.

The third operation, the complement of exclusive or, is equivalence or Boolean equality: x â‰¡ y is true just when x and y have the same value. Hence x âŠ• y as its complement can be understood as x â‰  y, being true just when x and y are different.


A law of Boolean algebra is an equation such as x∨(y∨z) = (x∨y)∨z between two Boolean terms, where a Boolean term is defined as an expression built up from variables and the constants 0 and 1 using the operations ∧, ∨, and ¬. The concept can be extended to terms involving other Boolean operations such as ⊕, →, and ≡, but such extensions are unnecessary for the purposes to which the laws are put. Such purposes include the definition of a Boolean algebra as any model of the Boolean laws, and as a means for deriving new laws from old as in the derivation of x∨(y∧z) = x∨(z∧y) from y∧z = z∧y as treated in the section on axiomatization.

Monotone laws

Boolean algebra satisfies many of the same laws as ordinary algebra when we match up ∨ with addition and ∧ with multiplication. In particular the following laws are common to both kinds of algebra.

Boolean algebra however obeys some additional laws, in particular the following.

A consequence of the first of these laws is 1∨1 = 1, which is false in ordinary algebra, where 1+1 = 2. Taking x = 2 in the second law shows that it is not an ordinary algebra law either, since 2×2 = 4. The remaining four laws can be falsified in ordinary algebra by taking all variables to be 1, for example in Absorption Law 1 the left h

Canonical form (Boolean algebra)

In Boolean algebra, any Boolean function can be expressed in a canonical formusing the dual concepts of minterms and maxterms. Minterms are called products because they are thelogical AND of a set of variables, and maxterms are called sums because they are the logical OR of a set of variables (further definition appears in the sections headed Minterms and Maxterms below). These concepts are called duals because of their complementary-symmetry relationship as expressed by De Morgan's laws, which state that AND(x,y,z,...) = NOR(x',y',z',...) and OR(x,y,z,...) = NAND(x',y',z',...) (the apostrophe ' is an abbreviation for logical NOT, thus " x' " represents " NOT x ", the Boolean usage " x'y + xy' " represents the logical equation " (NOT(x) AND y) OR (x AND NOT(y)) ").

The dual canonical forms of any Boolean function are a "sum of minterms" and a "product of maxterms." The term "Sum of Products" or "SoP" is widely used for the canonical form that is a disjunction (OR) of minterms. Its De Morgan dual is a "Product of Sums" or "PoS" for the canonical form that is a conjunction (AND) of maxterms. These forms allow for greater analysis into the simplification of these functions, which is of great importance in the minimization or other optimization of digital circuits.


The usual purpose of doing Boolean algebra is to simplify the design of a digital circuit that performs a function, either to minimize the number of gates, or to minimize the time for the value of the function to settle down after a change in its input(s), or some other practical criterion.

There are sixteen possible functions of two variables, but in digital logic hardware, the simplest gate circuits implement only four of them: conjunction(AND),disjunction(inclusive OR), and the complements of those (NAND and NOR).

Most gate circuits accept more than 2 input variables; for example, the spaceborne Apollo Guidance Computer, which pioneered the application of integrated circuits in the 1960s, was built with only one type of gate, a 3-input NOR, whose output is true only when all 3 inputs are false.


For a boolean function of n variables {x_1,\dots,x_n}, a product term in which each of the n variables appears once (in either its complemented or uncomplemented form) is called a minterm. Thus, a minterm is a logical expression of n variables that employs only the complement operator and the conjunction operator.

For example, abc, ab'c and abc' are 3 examples of the 8 minterms for a Boolean function of the three variables a, b and c. The customary reading of the last of those is a AND b AND NOT-c.

There are 2n minterms of n variables, since a variable in the minterm expression can be in either its direct or its complemented form--two choices per n variables.

Indexing minterms

In general, one assigns each minterm an index based on a conventional binary encoding of the complementation pattern of the variables (where the variables in all the minterms are written in the same order, usually alphabetical). This convention assigns the value 1 to the direct form (x_i) and 0 to the complemented form (x'_i). For example, we assign the index 6 to the minterm a b c' (110) and denote that minterm as m_6. Similarly, m_0 of the same three variables is a' b' c' (000), and m_7 is a b c (111).

Functional equivalence

It is apparent that minterm n gives a true value (i.e., 1) for just one combination of the input variables. For example, minterm 5, ab' c, is true only when a and c both are true and b is false—the input arrangement where a = 1, b = 0, c = 1 results in 1.

If one is given a truth table of a logical function, it is possible to write the function as a "sum of products". This is a special form of disjunctive normal form. For example, if given the truth table for the arithmetic sum bit u of one bit position's logic of an adder circuit, as a function of x and y from the addends and the carry in, ci:

Observing that the rows that have an output of 1 are the 2nd, 3rd, 5th, and 8th, we can write u as a sum of minterms m_1, m_2, m_4, and m_7. If we wish to verify this: u(ci, x, y) = m_1 + m_2 + m_4 + m_7 = (ci' x' y) + (ci' x y') + (ci x' y') + (ci x y) evaluated for all 8 combinations of the three variables will match the table.


For a boolean function of n variables {x_1,\dots,x_n}, a sum term in which each of the n variables appears once (in either its complemented or uncomplemented form) is called a maxterm. Thus, a maxterm is a logical expression of n variables that employs only the complement operator and the disjunction operator. Maxterms are a dual of the minterm idea (i.e., exhibiting a complementary symmetry in all respects). Instead of using ANDs and complements, we use ORs and complements and proceed similarly.

For example, the following are two of the eight maxterms of three variables:


There are again 2n maxterms of n variables, since a variable in the maxterm expression can also be in either its direct or its complemented form--two choices per n variables.

Indexing maxterms

Each maxterm is assigned an index based on the opposite conventional binary encoding used for minterms. The maxterm convention assigns the value 0 to the direct form (x_i) and 1 to the complemented form (x'_i). For example, we assign the index 6 to the maxterm a' + b' + c (110) and denote that maxterm as M6. Similarly M0 of these three variables is a + b + c (000) and M7 is a' + b' + c' (111).

Functional equivalence

It is apparent that maxterm n gives a false value (i.e., 0) for just one combination of the input variables. For example, maxterm 5, a' + b + c', is false only when a and c both are true and b is false—the input arrangement where a = 1, b = 0, c = 1 results in 0.

If one is given a truth table of a logical function, it is possible to write the function as a "product of sums". This is a special form of conjunctive norm

Boolean data type

In computer science, the Boolean or logical data type is the most primitive data type, having one of two values (true or false), intended to represent the truth values of logic and Boolean algebra. It is named after George Boole, who first defined an algebraic system of logic in the mid 19th century.


In programming languages that have a built-in Boolean data type, such as Pascal and Java, the comparison operators such as '>' and '≠' are usually defined to return a Boolean value. Also, conditional and iterative commands may be defined to test Boolean-valued expressions.

Languages without an explicit Boolean data type, like C and Lisp, may still represent truth values by some other data type. Lisp uses an empty list for false, and any other value for true. C uses an integer type, where relational expressions like i > j and logical expressions connected by && and || are defined to have value 1 if true and 0 if false, whereas the test parts of if, while, for, etc., treat any non-zero value as true. Indeed, a Boolean variable may be regarded (and be implemented) as a numerical variable with a single binary digit (bit), which can store only two values.

Most programming languages, even those that do not have an explicit Boolean type, have support for Boolean algebra operations such as conjunction (AND, &, *), disjunction (OR, |, +), equivalence (EQV, =, ==), exclusive or/non-equivalence (XOR, NEQV, ^, !=), and not (NOT, ~, !).

In some languages, the Boolean data type is defined to include more than two truth values. For instance the ISO SQL 1999 standard defined a Boolean value as being either true, false, or unknown (SQL null). Although this convention defies the law of excluded middle, it is often useful in programming.

In the lambda calculus model of computing, Boolean values can be represented as Church booleans.


One of the earliest languages to provide an explicit Boolean data type was ALGOL 60 (1960) with values true and false and logical operators denoted by symbols '\wedge' (and), '\vee' (or), '\supset' (implies), '\equiv' (equivalence), and '\neg' (not). Due to input device limitations of the time, however, most compilers used alternative representations for the latter, such as AND or 'AND'. This approach ("Boolean is a separate built-in primitive data type") was adopted by many later languages, such as ALGOL 68 (1970) , Java, and C#.

The first version of FORTRAN (1957) and its successor FORTRAN II (1958) did not have logical values or operations; even the conditional IF statement took an arithmetic expression and branched to one of three locations according to its sign. FORTRAN IV (1962), however, followed the ALGOL 60 example by providing a Boolean data type (LOGICAL), truth literals (.TRUE. and .FALSE.), Boolean-valued numeric comparison operators (.EQ., .GT., etc.), and logical operators (.NOT., .AND., .OR.). In FORMAT statements, a specific control character ('L') was provided for the parsing or formatting of logical values.

The Lisp language (1958) never had a built-in Boolean data type. Instead, conditional constructs like cond assume that the logical value "false" is represented by the empty list (), which is defined to be the same as the special atom nil or NIL; whereas any other s-expression is interpreted as "true". For convenience, most modern dialects of Lisp predefine the atom t to have value t, so that one can use t as a mnemonic notation for "true". This approach ("any value can be used as a Boolean value") was retained in most Lisp dialects (Common Lisp, Scheme, Emacs Lisp), and similar models were adopted by many scripting languages; although which values are interpreted as "false" and which are "true" vary from language to language. In Scheme, for example, the "false" value is an atom distinct from nil, so the latter is interpreted as "true". In Python, a numeric value of zero (integer or fractional), the null value (None), and empty containers (i.e. strings, lists, sets, etc.) are considered boolean false; all other values are considered boolean

From Encyclopedia

Boolean Algebra

In 1847 George Boole (1815–1864), an English mathematician, published one of the works that founded symbolic logic. His combination of ideas from classical logic and algebra resulted in what is called Boolean algebra. Using variables and symbols, Boole designed a language for describing and manipulating logical statements and determining if they are true or not. The variables stand for statements that are either true or false. The symbols +, * and − represent and, or, and not and are equivalent to the symbols [.logicaland], [.logicalor], and − used in the truth tables in logic. Although truth tables use T and F (for true and false respectively) to indicate the state of the sentence, Boolean algebra uses 1 and 0. The relationship between Boolean algebra, set algebra, logic, and binary arithmetic has given Boolean algebra a central role in the development of electronic digital computers. Besides its many applications in the design of computers, it forms the foundation of information theory. Boolean algebra is based on propositions, which are non-ambiguous sentences that can be either true or false. One can combine these propositions in a variety of ways by using the connectives and and or, or one can negate them by preceding them with not. The results of these operations on propositions are dictated by the rules of Boolean algebra. For example, if one says: "I will buy green mittens," then she is actually saying that she will buy mittens and those mittens will be green. Therefore the properties of "mittens" and "green" will have to be present in all her "hand-covering" purchases. This will exclude gloves and all non-green mittens. How does this work out using truth tables? Let A represent "mittens," B represent "green." Figure 1(a) shows how the statement "mittens and green" is represented using truth tables, while Figure 1(b) shows the same statement using Boolean algebra. What the tables indicate is that if an item does not possess both the quality of being a mitten and the quality of being green, then it will be discarded. Only those that satisfy both qualities will be selected. On the other hand, if one says: "I will buy gloves or mittens," then he is actually saying that he will buy mittens, or gloves, or some combination. This means that he will have a great assortment of "hand-covering" garments. Let A represent "mittens" and B represent "gloves." Figure 2(a) shows how the statement "mittens or gloves" is represented using truth tables, while Figure 2(b) shows the same statement using Boolean algebra. What the tables indicate is that an item will be selected if it possesses both qualities of mitten and glove, or possesses only one quality, either glove or mitten. Only those that satisfy neither quality will be discarded—for example, all red socks. One can also say: "I will buy something to cover my hands, but not mittens." Let A represent "mittens." Figure 3(a) shows how the statement "not mittens" is represented using truth tables, while Figure 3(b) shows the same statement using Boolean algebra. The tables indicate that if an item is a mitten then its negation, –A, represents a non-mitten—for example, a glove or a sock. Boolean algebra can be applied to the design and simplification of complex circuits present in computers because computer circuits are two-state devices: they can be either off or on. This corresponds to the general representation of Boolean algebra with two elements, 0 and 1. To show how this works, take a look at two simple circuits, "and," and "or," which correspond to the first two sets of tables presented earlier. These simple circuits consist of a power source—a battery connected by a wire to a destination—and a lamp with two switches that control the flow of electricity. The position of a switch either allows electricity to flow from the power source to the destination, or stops it. For example, if the switch is up, or open, then electricity does not flow, and this condition is represented by a 0. However, if the switch is down, or closed, the electricity will flow, and this is represented by 1. Figure 4 shows the diagram of a two-switch series circuit, where electricity will flow from the source to the destination only if both switches are closed. This diagram represents the and condition of Boolean algebra. A circuit where electricity flows whenever at least one of the switches is closed is known as a parallel circuit. This corresponds to the or condition of Boolean algebra. Figure 5 shows the diagram of a two-switch parallel circuit. To represent the not condition, one must remember that in this system a switch has only two possible positions, open or closed. Its complement is a switch that will have the opposite position. For example, if switch A is open, its complement will be closed and vice versa. Logic designers can use these diagrams to plan complex computer circuits that will perform the needed functions for a specific machine. Boolean algebra is used in information theory because almost all search engines allow someone to enter queries in the form of logical expressions. The operator and is used to narrow a query whereas or is used to broaden it. The operator not is used to exclude specific words from a query. For example, if one is looking for information about "privacy in computer environments," she could phrase her query as "computer and privacy," or "computer or privacy," or even "computer and privacy not mainframes." The amount of information received from each query will be different. The first query will retrieve fewer documents because it will only select those that contain both terms. The second will retrieve many documents because it will select those that contain "computer," those that contain "privacy," and also those that contain both terms. The last query will retrieve documents that contain both "privacy" and "computer," while anything containing the term "mainframe" will be discarded. When using search engines, one must realize that each one will access its database differently. Typically the same search performed in more than one database will not return the same result. To do a thorough search, one must become familiar with a few of the different search engines and understand their major features, such as Boolean logic and truncation. In addition, one must check the search engine's documentation often because it can change frequently. see also Algorithms; Binary Number System; Boole, George; Decision Support Systems; Digital Logic Design. Ida M. Flynn McCullough, Robert N. Mathematics for Data Processing, 2nd ed. Englewood, CO: Morton Publishing Co., 2001. Warring, Ronald H. Logic Made Easy. Summit, PA: TAB Books, Inc., 1985. Whitesitt, J. Eldon. Boolean Algebra and Its Applications. New York: Dover Publications, Inc., 1995.

From Yahoo Answers

Question:Which of the following is not a Boolean operator? a. AND b. OR c. NOT d. ADD

Answers:ADD Think of a IF statement.. IF this AND/OR/NOT happens than that happens


Answers:a boolean operator is a condition or expression that evaluates to a TRUE (-1) or FALSE (0) value.

Question:I use excel to keep track of my billing. When I send out an invoice, I put a "n" in a column titled "Have they paid me yet?" and delete the n when the check comes in. I want a formula that looks at that column, and for every n it finds, adds and totals the dollar value of those invoices into another cell. That way I can see how much money I would have if my clients actually paid me on time, and then cry. Can you write a mock equation for me? That was it! Now, as soon as I figure out how to award the points, you get them.

Answers:you can use the sumif() formula A1 to A10 has random n and blanks B1 to B10 has random amounts then copy&paaste this in C1 =SUMIF(A1:A10,"=n",B1:B10) its not case sensitive while you are at it, you can count the number of n's with the countif() formula =COUNTIF(A1:A10,"=n") you would need a true boolean if you added a 3rd criteria like a customer#..in that case sumproduct() would be my formula of choice.

Question:I want to see what words come up in Google...for example all words that start with "app" and the results should be something like, "apple", "application" "apps" ...etc. Are there Boolean operators for that or something else I can do?

Answers:Try putting a star after the prefix you want. So, like "app*". Hmm...just tried it out...I guess it's matching a word starting with app and then another word. Google is so annoying about it's searching sometimes...gah! Take a look at this page: http://google.about.com/od/googlepowersearches/qt/wildcardqt.htm If you're not looking for Google-specific results, maybe try another search engine. edit to CB: Google does not recognize "only boolean operators". And the wildcard would fall into the "or something else" category that was asked for.

From Youtube

Boolean Operators :This video demonstrate how to use Boolean operators when searching in library subscribed databases.

Boolean Operators :Do you want to decrease your time spent searching online? You can improve your searching abilities by using an easy tool called "Boolean operators."