BOOLEAN ALGEBRA TRUTH TABLE Truth table is a table which represents all the possible values of logical variables / statements along with all the possible results of the given combinations of values. Eg: X Y R represents TRUE and represents FALSE. TAUTOLOGY If result of any logical statement or expression is always TRUE or, it is called Tautology. FALLACY If result of any logical statement or expression is always FALSE or, it is called Fallacy. NOT OPERATOR This Operator operates on single variables. Truth Table X Result OR OPERATOR Operator denotes operation called logical addition.
X Y X+ Y AND OPERATOR AND Operator denotes operation called logical Multiplication. X Y X. Y Evaluation of Boolean Expressions Using Truth Table.. X + (Y.Z) X Y Z Y.Z (Y.Z) X+(Y.Z) BASIC LOGIC GATES Logic Gate 2
A Gate is simply an electronic circuit which operates on one or more signals to produce an output signal. There are three types of logic gates:-. Inverter (NOT Gate) 2. OR gate 3. AND gate Inverter (NOT Gate) An inverter (NOT gate) is a gate with only one input signal and one output signal. The output signal is always the opposite of the input state. Truth Table of NOT Gate X X NOT Gate Symbol OR Gate The OR Gate has two or more input signals but only one output signal. If anyone input signal is high () then output signal will be high (). X Y X+ Y OR Gate Symbol 3
AND Gate The AND Gate has two or more input signals but only one output signal. If anyone input signal is low () then output signal will be low otherwise high X Y X. Y AND Gate Symbol BASIC POSTULATES OF BOOLEAN ALGEBRA I. If x!= then x= and if x!= then x= II. OR Relations (logical Addition) + = + = + = + = 4
III. AND Relations (Logical Multiplication). =. =. =. = IV. Complement rules = = PRINCIPLE OF DUALITY This states that starting with a Boolean relation another Boolean relation can be derived by. Changing each OR sign to an AND sign. 2. Changing each AND sign to OR sign. 3. Replacing each by and each by. The derived relation using duality principal is called dual of original expression. BASIC THEOREMS OF BOOLEAN ALGEBRA. Properties of and a. + X = X b. + X = c.. X = d.. X = X 2. Indempotence Law (a) X + X = X (b) X. X = X Proof (a) X + X = X X X R 5
Proof (b) X. X = X X X R 3. Involution X = X Proof X X X (9) Complementarity Law (a) X + X = (b) X. X = Proof X X X+X X X X.X () Commutative Law 6
i. X + Y= Y + X X Y X + Y Y + X ii.x.y = Y. X X Y X.Y Y.X () The Associative Law (i) X + (Y + Z) = (X + Y) + Z (ii) X(YZ) =(XY)Z Truth table for X+(Y+Z) = (X+Y)+Z is given below : Input Output X Y Z Y+Z X+Y X+(Y+Z) (X+Y)+Z 7
Comparing the columns X+(Y+Z) and (X+Y)+Z, we see both of these are identical, Hence proved. Since (i) is proved, (ii) is dual of rule (ii), hence it is also proved. (2) The Distributive Law (i) X(Y+Z) = XY+XZ (ii) X+YZ =(X+Y)(X+Z) Truth table for X(Y+Z) = XY+XZ are given below: Input Output X Y Z Y+Z XY XZ X(Y+Z) XY+XZ 8
Both the columns X(Y+Z) and XY+YZ are identical, hence proved. The algebraic proof of law X+YZ=(X+Y)(X+Z) RHS = (X+Y)(X+Z) =XX+XZ+XY+YZ =X+XZ+XY+YZ =X+XY+XZ+YZ =X(+Y)+Z(X+Y) =X.+Z(X+Y) =X+XZ+YZ=X(+Z)+YZ =X +YZ = LHS, Hence proved. Eg: State Distributive law and verify the same using truth table. Ans. If X, Y, Z are Boolean Variables then X.(Y + Z) = X.Y + X.Z or X+Y.Z = (X+Y).(X+Z) X Y Z Y+Z X.(Y+Z) X.Y X.Z X.Y+X.Z 9
(3) Absorption law (i) X+XY = X (ii) X(X+Y) =X (i) Truth table for X+XY = X is given below : Input Output X Y XY X+XY Both the columns X+XY and X are identical, hence proved. (ii) Truth table for X.(X+Y) = X is given below : Input Output
X Y X+Y X(X+Y) Column X and X(X+Y) are identical, hence proved. DEMORGAN S THEOREMS. Demorgan s First Theorem (X+Y) = X Y Proof (X+Y)+(X Y ) = (X+Y)+X Y =((X+Y)+X ).((X+Y)+Y ) = (X+X +Y).(X+Y+Y ) = (+Y).(X+) =. = (X+Y).(X Y ) = (X+Y).(X Y ) = X Y.(X+Y) = X Y X+X Y Y =.Y+X. = Hence proved 2. Demorgan s Second Theorem (X.Y) = X +Y Proof XY + (X +Y ) = =(X +Y )+XY
=(X +Y +X).(X +Y +Y) =(X+X +Y ).(X +Y+Y ) =(+Y ).(X +) =. = XY. (X +Y ) = = XY.( X +Y ) ->X(Y+Z)=XY+XZ = XYX +XYY =.Y+X. = + = Note:- Find the dual of the following expression. (X+Y)+Z=X+(Y+Z) The dual is (X.Y).Z=X.(Y.Z) Derivation of Boolean expression. Minterms Minterms is a product of all the literals (with or without the bar) within the logic system. Example: Convert X+Y to minterm X+Y = X.+Y. (Because X. = X) = X.(Y+Y )+Y.(X+X ) (Because X+X = ) = XY+XY +XY+X Y By Distributive law = XY+XY +X Y (Because X+X = X) 2. Maxterms Maxterm is a sum of all the literals (with or without the bar) within the logic system. Example: If the value of the variables are X=, Y= and Z= then the Maxterm will be X+Y +Z 2
3. Canonical Expression Boolean expression composed entirely either of minterms or Maxterm is referred to as canonical expression. Canonical expression can be represented in two forms: a. Sum of Products (SOP) form ii) Product of Sum (POS) form Canonical Sum of Products form When a Boolean expression is represented purely as sum of minterms (Product terms), it is said to be canonical Sum of Product form. Truth table for Product Terms (3 input) X Y Z ProductTerms/ Minterms X Y Z X Y Z X YZ X YZ XY Z XY Z XYZ XYZ Canonical sum of products expression can also be represented by the following Short hand notation. Example: - F= (,4,5,6,7) = m + m4 + m5 + m6 + m7 = + + + + (Boolean values for decimal numbers) = X Y Z + XY Z + XY Z+XYZ +XYZ Canonical Product of sum form 3
When a Boolean expression is represented purely as product of maxterms, it is said to be in canonical Product of Sum form of expression. Truth table for Sum Terms (3 input) X Y Z SumTerms/Maxterms X+Y+Z X+Y+Z X+Y +Z X+Y +Z X +Y+Z X +Y+Z X +Y +Z X +Y +Z Canonical product of sum expression can also be represented by the following Short hand notation. Example(): - F= (,4,5,6,7) =M. M4. M5. M6.M7 = + + + + (Boolean values for decimal numbers) = (X+Y+Z )( X +Y+Z)( X +Y+Z )( X +Y +Z)( X +Y +Z ) Minimization of Boolean expression. Algebraic method Example : - Reduce X Y Z + X YZ + XY Z + XYZ = X (Y Z + YZ ) + X(Y Z +YZ ) =X (Z (Y +Y)) + X(Z (Y +Y)) =X (Z.)+X(Z.) =X Z +XZ =Z (X +X) =Z. =Z 4
2. Simplification using karnaugh maps Karnaugh map Karnaugh map or K map is a graphical display of the fundamental products in a truth table. K Map is nothing but a rectangle made up of certain number of squares represents a Maxterm or minterm SOP reduction using K-maps For a function of n variables, there would be a map of 2 n squares each represents a minterm. Following are two, three, four variables k-maps for SOP reduction. Two variables Three variables 5
Four variable: ) Reduce the following Boolean expression using K-Map Ans. F(U,V,W,Z) = (,, 2, 3, 4,, ) 6
. Obtain the simplified form of a boolean expression using Karnaugh map. F(U,V,W,X) = (,3, 4, 5, 7,, 3, 5) [] U V []W Z [] W Z []WZ []WZ [] U V [] UV [] UV 2 quads, pair. Quad (m3+m7+m+m5) reduces to WZ Quad 2(m5+m7+m3+m5) reduces to VZ Pair (m,m4) reduces to U W Z Therefore F=WZ + VZ + U W Z POS reduction using K-maps : - For a function of n variables, there would be a map of 2 n squares each represents a maxterm. Following are two, three, four variables k-maps for POS reduction. Two variables Y Y X+Y X+Y 7
X +Y 2 X +Y 3 X X Three variables Y+Z Y+Z Y +Z Y +Z X+Y+Z X+Y+Z X+Y +Z 3 X+Y +Z 2 X +Y+Z 4 X +Y+Z 5 X +Y +Z 7 X +Y +Z 6 X X Four variables W+X+Y+Z W+X +Y+Z 4 W +X +Y+Z 2 W +X+Y+Z 8 Y+Z Y+Z Y +Z Y +Z W+X+Y+Z W+X+Y +Z W+X+Y +Z 3 2 W+X +Y+Z W+X +Y +Z W+X +Y +Z 5 7 6 W +X +Y+Z W +X +Y +Z W +X +Y +Z 3 5 4 W +X+Y+Z W +X+Y +Z W +X+Y +Z 9 8
W+X W+X W +X W +X More about Logic Gates NAND and NOR Gates NAND and NOR gates can greatly simplify circuit diagrams. As we will see you can use these gates wherever you could use AND, OR, and NOT. NAND Gate:- The NAND gate has two or more input signals but only one output signal. If all of the inputs are (high), then the output produced is (low). 9
A B B A NAND NOR Gates:- The NOR gates has two or more input signals but only one output signal. If all inputs are (i.e., low), then the output signal is (high). A B B A 2
NOR XOR and XNOR Gates XOR is used to choose between two mutually exclusive inputs. Unlike OR, XOR is true only when one input or the other is true, not both A B AÅB XOR Gate (Exclusive OR gate):- The XOR gate can also have two or more inputs but produces one output signal. Exclusive-OR gate different from OR gate. OR gate produces output for any input combination having one or more s, but XOR gate produces output for only those input combinations that have odd number s. XOR 2
XNOR Gate (Exclusive NOR gate) The XNOR Gate is logically equivalent to an inverted XOR i.e., XOR gate followed by a NOT gate (inventor). Thus XNOR produces (high) output when the input combination has even number of s. A B A B XNOR SOLVED PROBLEMS mark Questions ) Why are AND and NOR gates called Universal gates? () 22
Ans. NAND and NOR gates are less expensive and easier to design. Also, other switching functions (AND, OR) can easily be implemented using NAND/NOR gates. Thus, these (NAND, NOR) gates are also reffered to as Universal Gates. (2) Write the Sum of Products form of the function G(U,V,W). Truth table representation of G is as follows: () U V W G Ans. To get the product of sums form, we need to add maxterms for all those input combinations that produce output as. Thus, G(U,V,W) = (U + V + W) (U + V + W ) (U + V + W ) (U + V + W ) (3) Convert P+Q R to product of sum Ans: P+Q R=(P+Q ) (P+R ) =(P+Q +RR ) ( P+QQ +R) [ by the rule A+BC= (A+B)(A+C) [ by the rule AA = 23
= (P+Q +R) (P+Q +R ) (P+Q+R) (P+Q +R) [ by the rule A+BC= (A+B)(A+C) (4) Concert X+YZ into sum of product Ans: X+YZ=X.+YZ. [by the rule A.=A = X(Y+Y )+YZ(X+X ) [ by the rule A+A = =XY+XY +YZX+YZX =XY.+XY.+XYZ+YZX [by the rule A.=A =XY(Z+Z )+XY (Z+Z )+XYZ+X YZ [ by the rule A+A = =XYZ+XYZ +XY Z+XY Z +XYZ+X YZ 2 marks Questions () Write the equivalent Boolean Expression for the following Logic circuit.. Prove that X.(X+Y)=X by truth table method. (2) 24
Ans. X Y X+Y X.(X+Y). 2. From the above table it is obvious that X.(X+Y) = X because both the columns are identical. 2. Prove that X.(X+Y)=X by algebric method (2) Ans. LHS = X.(X+Y) = X.X+X.Y =X+X.Y =X.(+Y) =X. = X = RHS 3. State the distributive laws of Boolean algebra. How are they different from distributive laws of ordinary algebra. (2) Ans. Distributive laws of Boolean algebra state that i. X(Y+Z) = XY+XZ ii.x+yz =(X+Y)(X+Z) Ist law X(Y+Z) = XY+XZ holds good for all values of X, Y and Z in ordinary algebra whereas X+YZ =(X+Y)(X+Z) holds good only for two values (,) of X, Y and Z. 4. In Boolean algebra, verify using truth table that (X + Y) = X Y for each X, Y in (, ). (2) 25
Ans. As it is a 2-variable expression, truth table will be as follows : X Y X+Y (X+Y) X Y X Y 5. State Demorgan s laws. Verify one of the Demorgan s laws using truth tables. (2) Ans. De Morgan s first theorem. It states that X + Y = X. Y De Morgan s second theorem. It states that X. Y = X + Y Truth table for second theorem X Y X.Y X.Y X Y X+Y X.Y and X+Y are identical. 6. Draw the logic circuit diagram for the following expression : (2) Y = a b + b c + c a 26
7. Prepare a truth table for X Y Z + X Y (2) Ans. Truth table for is given below : Input O u t p u t X Y Z X Y Z X YZ XY X YZ + XY 27
(9) Write the equivalent expression for the following logic circuit : (2) Ans. F=(AC) +(BA) +(BC) () Write the equivalent expression for the following logic circuit: (2) Ans. (X + Y )(X + Y)(X + Y ) 4 marks Questions () Obtain the simplified form of a boolean expression using Karnaugh map. (4) F(u,v,w,x) = (, 3, 4, 5, 7,, 3, 5) []W Z [] W Z []W Z []W Z 28
[] U V [] U V [] U V [] U V 2 quads, pair. Quad (m3+m7+m+m5) reduces to WZ Quad 2(m5+m7+m3+m5) reduces to VZ Pair (m,m4) reduces to UWZ Therefore F=WZ + VZ + UWZ 8. By means of truth table, demonstrate the validity of the following Postulates / Laws of Boolean algebra: (4) a. Commulative law b. Idempotent law Ans. (a) The commulative law states that (i) X+Y = Y+X (ii) X.Y =Y.X (i) Truth table for X+Y = Y+X is given below : Input Output X Y X+Y Y+X 29
Comparing the columns X+Y and Y+X, we see both of these are identical. Hence proved. (ii) Truth table for X.Y = Y.X is given below: Input Output X Y X.Y Y.X Comparing the columns X.Y and Y.X, we see both of these are identical. Hence proved. (b) The Idempotent law states that (i) X+X = X ii) X.X =X (i) Truth table for X+X = X is given below : Input Output X X X+X (ii) Truth table for X.X = X is given below : Input Output X X X.X 3
POINTS TO REMEMBER Binary Decision Logical Statements TRUTH TABLE :-Truth table is a table which represents all the possible values of logical variables /statements along with all the possible results of the given combinations of values TAUTOLOGY:-If result of any logical statement or expression is always TRUE or, it is called Tautology. FALLACY : - If result of any logical statement or expression is always FALSE or, it is called Fallacy. PRINCIPLE OF DUALITY This states that starting with a Boolean relation another Boolean relation can be derived by. Changing each OR sign to an AND sign. 2. Changing each AND sign to OR sign. 3. Replacing each by and each by. The derived relation using duality principal is called dual of original expression. BASIC THEOREMS OF BOOLEAN ALGEBRA 4. Properties of and 5. +x=x 6. +x= 7..x= 3
8..x=x 9. Indempotence law (a) x+x=x (b) x.x=x Involution x =x Complementarity law (a) x+x = (b) x.x = Cummtative law x + y= y+x The associative law (i) X+(Y+Z) = (X+Y)+Z The distributive law (i) X(Y+Z) = XY+XZ Absorption law (ii) X(YZ) =(XY)Z (ii) X+YZ =(X+Y)(X+Z) (i) X+XY = X (ii) X(X+Y) =X DEMORGAN S THEOREMS (X+Y) =X Y (X.Y) =X +Y Minterms: - Minterms is a product of all the literals (with or without the bar) within the logic system. Maxterms: - Maxterm is a sum of all the literals (with or without the bar) within the logic system Canonical sum of product form:- When a Boolean expression is represented purely as sum of minterms or product terms, it is said to be canonical sum of product form. 32
Canonical Product of sum form: - When a Boolean expression is represented purely as product of maxterms, it is said to be in canonical product of sum form of expression. NOR Gates:- The NOR gates has two or more input signals but only one output signal. If all inputs are (i.e., low), then the output signal is (high). NAND Gate:- The NAND gate has two or more input signals but only one output signal. If all of the inputs are (high), then the output produced is (low). XOR Gate (Exclusive OR gate):- The XOR gate can also have two or more inputs but produces one output signal. Exclusive-OR gate different from OR gate. OR gate produces output for any input combination having one or more s, but XOR gate produces output for only those input combinations that have odd number s. XNOR Gate (Exclusive NOR gate) The XNOR Gate is logically equivalent to an inverted XOR i.e., XOR gate followed by a NOT gate (inventor). Thus XNOR produces (high) output when the input combination has even number of s. 33
34