#### • Class 11 Physics Demo

Explore Related Concepts

# definition of boolean operators

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.

## Values

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.

## Operations

### 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&minus;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&nbsp;â†’&nbsp;y, is called material implication. If x is true then the value of x&nbsp;â†’&nbsp;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&nbsp;âŠ•&nbsp;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&nbsp;2 where 1&nbsp;+&nbsp;1 =&nbsp;0.

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

## Laws

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&times;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.

## Summary

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.

## Minterms

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.

## Maxterms

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:

a+b'+c
a'+b+c

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.

## Implementations

In programming languages that have a built-in Boolean data type, such as Pascal and Java, the comparison operators such as '&gt;' 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.

## History

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

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

Question:

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?