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 / 6
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 / 6
Y F = X + Y 3 / 6
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 / 6
5 / 6
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 / 6
AND X Y F(X,Y) 7 / 6
OR X Y F(X,Y) 8 / 6
9 / 6
NOT X F(X) Truth tables may contain as many input variables as desired F(X,Y,Z) = X.Y + Z X Y / 6
Z F(X,Y,Z) / 6
2 / 6
3 / 6
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 4 / 6
This property tells us we can associate groups of added or multiplied variables together with parentheses without altering the truth of the equations. 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. 5 / 6
To summarize, here are the three basic properties: commutative, associative, and distributive. Identities In The zero algebra mathematics, algebraic equals has its own original an identity unique "anything," identities is a statement no based matter identity true on what for the of all bivalent value x possible + that = states x tells "anything" values of us Boolean that of its (x) anything may variables. be. (x) or Boolean added variables. to Inverse Another inverted original an even Boolean identity twice. number Complementing having value. of negations This to do is with cancel analogous a variable complementation to leave to twice negating the (or original any is (multiplying that even value. of number the double by -) of times) in complement: real-number results in a algebra: variable the Duality operators identities Example X.Y+Z' Indempotent An Boolean. Principle 2. input A = +. (X'+Y').Z A on AND ed and algebras = the Law replacing right. with the itself 's duality by or OR'ed 's OR ed Principle and with 's can by itself 's. be is is Compare obtained equal to the that by to identities interchanging input. on the AND left and side OR with the Involution A When Thus Absorption (i) LHS=A+AB=A.+A.B=A(+B)+A(B+)=A.=A=RHS (ii) LHS=A.)A+B)=A.A+A.B=A+A.B=A+A.B=A(+B)=A.=A=RHS A.(A+B)=A A =A A=, A=, Law: A =, Law: A, =, A = ==A A A = ==A variable AND'ed with itself is always equal to the variable. Complementary AA' De theorems First (A+B) term ANDed with Law LHS= A+A' Morgan s = Theorem: = (A+B) given was Theorem (+) by a great De its complement Morgan complement = logician are and of associated equals a Mathematician, sum, equals and with a to Boolean term as the well product ORed algebra. as a with of friend the its of Charles Boole. equals The RHS=A.B =. =.= Second Proof: Summary = (A.B) Theorem: + of = Boolean = (.) + The = = indetities complement = + = of a product equals the sum of the complements. 6 / 6