Introduction to Boolean Algebra Boolean algebra which deals with two-valued (true / false or and ) variables and functions find its use in modern digital computers since they too use two-level systems called binary systems. Let us examine the following statement:"i will buy a car If I get a salary increase or I win the lottery." This statement explains the fact that the proposition "buy a car" depends on two other propositions "get a salary increase" and "win the lottery". Any of these propositions can be either true or false hence the table of all possible situations: Salary Increase Win Lottery Buy a car = Salary Increase or Win Lottery False False False False / 9
True True True False True True True True The mathematician George Boole, hence the name Boolean algebra, used for true, for false and + for the or connective to write simpler tables. Let X = "get a salary increase", Y = "win the lottery" and F = "buy a car". The above table can be written in much simpler form as shown below and it defines the OR function. X 2 / 9
Y F = X + Y 3 / 9
Let us now examine the following statement:"i will be able to read e-books online if I buy a computer and get an internet connection." The proposition "read e-books" depends on two other propositions "buy a computer" and "get an internet connection". Again using for True, for False, F = "read e-books", X = "buy a computer", Y = "get an internet connection" and use. for the connective and, we can write all possible situations using Boolean algebra as shown below. The above table can be written in much simpler form as shown below and it defines the AND function. X Y F = X. Y 4 / 9
5 / 9
We have so far defined two operators: OR written as + and AND written.. The third operator in Boolean algebra is the NOT operator which inverts the input. Whose table is given below where NOT X is written as X'. X NOT X = X' The 3 operators are the basic operators used in Boolean algebra and from which more complicated Boolean expressions may be written. Example: F = X. (Y + Z) Truth Tables Truth tables are a means of representing the results of a logic function using a table. They are constructed by defining all possible combinations of the inputs to a function, and then calculating the output for each combination in turn. For the three functions we have just defined, the truth tables are as follows. 6 / 9
AND X Y F(X,Y) 7 / 9
OR X Y F(X,Y) 8 / 9
9 / 9
NOT X F(X) Truth tables may contain as many input variables as desired F(X,Y,Z) = X.Y + Z X Y / 9
Z F(X,Y,Z) / 9
2 / 9
3 / 9
Different Properties or Laws of Boolean Algebra A "property" or a "law," describes how differing variables relate to each other in a system of numbers. Commutative Property It applies equally to addition and multiplication. In essence, the commutative property tells us we can reverse the order of variables that are either added together or multiplied together without changing the truth of the expression. Associative Property This property tells us we can associate groups of added or multiplied variables together with parentheses without altering the truth of the equations. 4 / 9
Distributive Property Distributive Property, illustrating how to expand a Boolean expression formed by the product of a sum, and in reverse shows us how terms may be factored out of Boolean sums-of-products. To summarize, here are the three basic properties: commutative, associative, and distributive. Identities In mathematics, an identity is a statement true for all possible values of its variable or variables. The algebraic identity of x + = x tells us that anything (x) added to zero equals the original "anything," no matter what value that "anything" (x) may be. Boolean algebra has its own unique identities based on the bivalent states of Boolean variables. Inverse 5 / 9
Another identity having to do with complementation is that of the double complement: a variable inverted twice. Complementing a variable twice (or any even number of times) results in the original Boolean value. This is analogous to negating (multiplying by -) in real-number algebra: an even number of negations cancel to leave the original value. Duality Principle In Boolean algebras the duality Principle can be is obtained by interchanging AND and OR operators and replacing 's by 's and 's by 's. Compare the identities on the left side with the identities on the right. Example X.Y+Z' = (X'+Y').Z Indempotent Law An input AND ed with itself or OR ed with itself is equal to that input.. A + A = A, A variable OR'ed with itself is always equal to the variable. 2. A. A = A, A variable AND'ed with itself is always equal to the variable. Involution Law: 6 / 9
A =A When A=, A =, A = ==A When A=, A =, A = ==A Thus A =A Absorption Law: (i) A+AB=A LHS=A+AB=A.+A.B=A(+B)+A(B+)=A.=A=RHS (ii) A.(A+B)=A LHS=A.)A+B)=A.A+A.B=A+A.B=A+A.B=A(+B)=A.=A=RHS Complementary Law A term ANDed with its complement equals, and a term ORed with its complement equals 7 / 9
AA' = A+A' = De Morgan s Theorem De Morgan was a great logician and Mathematician, as well as a friend of Charles Boole. The theorems given by De Morgan are associated with Boolean algebra. First Theorem: The complement of a sum equals to the product of the complements. (A+B) =A.B Proof: LHS= (A+B) = (+) = = RHS=A.B =. =.= Second Theorem: The complement of a product equals the sum of the complements. Proof: 8 / 9
LHS = (A.B) = (.) = = RHS = A + B = + = + = Summary of Boolean indetities 9 / 9