` Logic Gates and Boolean 2 Algebra Chapter-2 (Hours:06 Marks:14 )( 12064 Digital Techniques) Logic Gates And Boolean Algebra 2.1 Logical symbol, logical expression and truth table of AND, OR, NOT, NAND, NOR, EX-OR and EX-NOR gates. 2.2 Universal gates NAND and NOR gates 2.3 Logical circuits of basic gates using universal gates 2.4 Gates using more than two inputs. 2.5 TTL and CMOS logic gate ICs and their pin configurations. (To be covered in Practical) 2.6 Basic laws of Boolean algebra, Duality theorem. 2.7 De Morgan s theorems. Logic Gates Q.1What is meaning of Word Logic Gate? Ans. The word logic is commonly used in conversation English and it is derived form Greek word LOG which refers to reason and the suffix IC meaning the study of so logic is study of reason. Gate is another common word. The common usage of gate is an opening in a wall, a means of exit or entrance. The technical definition of gate is a natural extension of its common form. It is a device whose output is a specific when specified input condition are met. Gate A gate is a logic circuit which has one or many input and a single output. There will be an output only for certain condition of input. The logic gate is a basic building block of digital electronics. There are three basic or fundamental logic gates or logic operators. Those are 1. NOT gate 2. OR gate 3. AND gate Q.2.Describe with symbol, truth table, operation of NOT gate Ans. Not operation is referred as Inversion or Complementation The NOT gate is also called as Inverter because it only inverts the input i.e. logic 1 state at the input becomes logic 0 at the output and vice versa. NOT gate is an electronic circuit with only one input and one output signal. 1
Logic Equation Y = A Y = NOT A Y is complement of A The presence of the small circle, known as bubble always denotes inversion in the digital circuit. Symbol : NOT gate Truth table A Waveform Y = A A Y 0 1 1 0 Input (A) Output (Y) IC NOT Gate Fig.IC 7404 Hex Inverter Q.3.Describe with symbol, truth table, operation of AND gate Ans. A circuit which performs an AND operation is called as AND gate. This gate has two or more inputs signals but only one output signal. The AND gate has a high output only when all inputs are high. It indicates Logical Multiplication denoted by dot (.). Symbol A Y = A. B B = A And B Waveform Truth Table of And Gate A B Y 0 0 0 0 1 0 1 0 0 1 1 1 2
Summary of And Function 1.When all the inputs are 1 then only output is 1 2.Output is equal to 0 when one or more inputs are 0 3.The And operation is performed exactly same as ordinary multiplication of 1s and 0s AND Gate IC ( 7408 Quad Two Input AND gate ) Fig.IC 7408 Quad 2Input AND gate Q.4. Describe with symbol, truth table, operation of OR gate Ans. An electronics circuit which performs OR Function is called as OR gate.the OR gate has two or more inputs signal but only one outputs signal. If any or all input signal is high the output signal is high. It indicates logical addition and denoted by + sign. Symbol Truth Table A B Y 0 0 0 0 1 1 1 0 1 1 1 1 Wave form of OR Gate 3
OR Gate IC ( 7432 Quad Two Input OR gate ) Fig.Quad 2-Input OR gate Summary of OR Function 1.When any of the inputs is 1 the output of OR function is 1 2.Output is equal to 0 when all inputs are 0 3.With OR operation 1+1 =1, 1+1+1=1, 1+1+1+1=1. and so on Q.5.Draw the symbol and write the truth table for 3 input OR and AND Gate Ans.3 Input OR Gate A B C Y = A + B + C Truth Table Input Output A B C Y=A+B+C 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 1 4
3 Input AND Gate A B C Y = A. B. C Truth Table Input Output A B C Y=A+B+C 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 IC numbers for 3 Input gates //Diagram Q.6.Why NAND and NOR gates are called as Universal gates Ans. Any Boolean (or logic) equation can be realized by using the AND, OR & NOT gates. From these three operation two more operations are derived 1) The NAND operation ( AND + NOT) 2) The NOR operation ( OR + NOT ) These operation have before very popular and are widely used. The reason being the only one type of gates either NAND or NOR are sufficient for the realization (implementing ) of any logical operation. Because of this reason NAND and NOR gates are known as universal gates. Using theses gates one can realize any given logical expression like AND, OR, NOT,XOR, XNOR, as a result they are called as Universal Logic Gates 5
Q.7.Describe with symbol, truth table, operation of NAND gate Ans.NOT Operation followed by AND operation(and+not) The word NAND stands for NOT-AND. When a NOT gate is combined with the AND gate the resultant is NAND gate. In these with AND gate function, inversion occurs. In this gate output is high when any of the input are high, whereas output is low when all the input are high. Symbol Truth Table Wave form A B Y 0 0 1 0 1 1 1 0 1 1 1 0 Equivalent and Symbols of NAND Gate Note : Bubble indicate inversion and Bar on the equation indicates the inversion The NAND gate has two or more inputs but only one output. All the inputs must be set to high to get a low output. If any input is low output is high. Fig. Quad 2 Input NAND Gate 6
Q.8.Describe with symbol, truth table, operation of NOR gate Ans. The word NOR stands for NOT-OR. When a Not gate is combined with the OR gate in cascade the resultant gate is known as NOR gate. Here together with OR gate inversion takes place. Symbol Truth Table Waveform A B Y 0 0 1 0 1 0 1 0 0 1 1 0 Equivalent and symbol of NOR gate The NOR gate has two or more inputs but only one output. In NOR gate all must tied high to get output logic low. If any input is high output is low. Fig.Quad 2-Input NOR gate 7
Q.9.Describe with symbol, truth table, operation of EXOR gate Ans. Exclusive-OR or Ex-OR is called Ex-OR because it is special case of OR gate. It is not a basic operation and can be performed using basic gates AND, OR, NOT or universal gates (NOR and NAND). Comparison of Gates Truth table - OR gate Truth table - EX-OR gate A B Y A B Y 0 0 0 0 0 0 0 1 1 0 1 1 1 0 1 1 0 1 1 1 1 1 1 0 If we compare truth table of EXOR gate with OR gate then in truth table three rows are same, only fourth row is different. Hence it is named as EXOR which excludes the condition of OR gate,where both A and B are 1 and normal OR operation is called as Inclusive OR. Truth Table A B Y 0 0 0 0 1 1 1 0 1 1 1 0 Symbol and Equation of Ex-OR gate waveform Truth Table The EXOR gate has two or more inputs but only one output. For an EXOR gate if odd number of inputs are 1 then output is logic 1 and if even number of input are same then output is logic 0. For two input EXOR gate, then output of gate is logic 1 if both the inputs are different (i.e. one input as logic 0 and other as logic 1). The output is logic 0 if both input are same i.e. either logic 0 or logic 1. Basic Property The property of the gate is that output is HIGH only if ODD number of the inputs are HIGH. If EVEN number are HIGH then the output is LOW. 8
Fig.Quad 2-Input ExOR Gate Q.10. Describe with symbol, truth table, operation of EXNOR gate Ans. This gate is NOT followed by EX-OR gate. The output of EX-OR gate is logic 1 when both the inputs are same i.e. logic 0 or logic 1. The output is logic 0 when both the inputs are different i.e. one held at logic 0 and another at logic 1. EXNOR is complement of EXOR operation. Symbol and equation Truth Table Waveform A B Y 0 0 1 0 1 0 1 0 1 1 1 0 Q.11.Prove NAND Gate as Universal Logic or Prove NAND Gate as NOT, OR, AND, EXOR Ans. 1) NAND as NOT gate Y = A.B = X.X Let B = A = X Since A.A =A Y = X which equation for Not Gate A B Y Analysis 0 0 1 For all input = O, output is 1 0 1 1 ----------- 1 0 1 ----------- 1 1 0 For all input = 1, output is 0 9
An Inverter can be made form NAND gate by connecting all of the inputs together and taking a single input as shown in the figure 2) NAND as AND gate An AND function can be generated using only NAND gates. It is generated by simply inverting output of NAND gate. Fig. shows the two input AND gate using NAND gates. Fig. And gate using Nand gate Output of 1 ST NAND gate X = A.B Output of 2 nd NAND gate Y = X Y = A.B = A.B Which is same as for And gate. 3) NAND as OR gate Or gate can be designed using the Nand Gate as follows Fig. Nand gate as Or Gate 10
Y = A.B = A + B By DMT = A + B since A = A this is the Equation for OR gate Note : Bubble at the input of NAND gate indicates inverted input. 4) NAND as EX-OR gate: Y = X.Z = AB. AB BY D.M.T = AB + AB = A B Which is same for EX- OR gate Q.12.Prove NOR Gate as Universal Logic or Prove NOR Gate as NOT, OR, AND, EXOR Ans. Basic gates using NORgate 1) NOR as NOT gate: An inverter can be made from a NOR gate by connecting all of the inputs together and making a single common input, as shown in Fig. Logic Circuit Y = A+B = X+X Truth table = X Since A.A =A this is the Equation for NOT gate 11
Boolean Equation 2) NOR as OR gate : An OR function can be generated using only NOR gates. It can be generated by simply inverting output of NOR gate. Fig shows the two input OR gate Output of 1 ST NAND gate X = A+B Output of 2 nd NAND gate Y = X Y = A+B = A+B Same as that of OR gate 3) NOR as AND gate: And Can be designed using NOR as Follows ` Y = A+B = A.B A.B = 12
By DMT Same as that of AND Gate Fig. Nor as And gate logic diagram Boolean Equation Truth Table Note : Bubble at the input of NOR gate indicates inverted input. 4) NOR as EX-NOR gate ( For Students) Y = (A+B)+(A+B) = AB + AB = A Ο B Same as that of EX- NOR gate Q.13.Implement EXOR gate using Basic Gate Ans. Ex-OR gate using Basic Gates ExNor Using Basic Gates (For Students) Boolean Laws and Demorgans Theorem 13
The rules for manipulation of binary numbers developed English mathematician George Boolea are known as Boolean Algebra. This the basic of all digital systems like computer, calculator etc. A Boolean variable has two values 1 and 0 s (high or low, true or false). The basic Boolean operation are AND,OR,NOT. Q.14.How Boolean Algebra differ Conventional Algebra Ans. Basic of Boolean Algebra Logical algebra differs from conventional algebra in three respects 1. The symbols used in logical algebra (usually) letters, do not represent numerical values. 2. Arithmetic operations are not performed in logical algebra. In Boolean Algebra there are no fractions, decimals, negative numbers, square root,cube root, logarithms, imaginary numbers and so on. 3. Third and very important point is logical algebra allows only two possible values 1 and 0 s for any variables. Thus logical algebra is ideally suited for the system based on the two opposite values such as ON and OFF. Q.15.List and Describe different Boolean Laws Ans.Laws of Boolean Algebra 1. And Law 2. OR Law 3. Double Complementation Law 4. Commutative law 5. Associative Law 6. Distributive Law The AND law The AND operation or ANDing is similar to multiplication. The AND law Says a) A.0=0 b) A.1=A c) A.A=A d) A.A=0 The OR law The OR operation or ORing mean adding two Boolean variables. The OR laws are a) A+0=A b) A+1=1 c) A+A=A d) A+A=1 14
Double complementation Law Complementation means inversion and law of complementation results from the NOT operation. The law state a) 0 = 1 if A = 0 b) 1 = 0 if A = 1 A = A i.e. called as double Inversions. Cumulative law The Cumulative law states that the order in which an operation is performed on a pair of variables does not affect the result of operation. In Boolean operation order of variables in OR and AND is insignificant ie Cumulative law allows the changes of position of and OR and AND variables. Thus a) A+B = B+A b) A.B = B.A Proof by perfect induction method. A B A+B B+A A B A.B B.A 0 0 0 0 0 0 0 0 0 1 1 1 0 1 0 0 1 0 1 1 1 0 0 0 1 1 1 1 1 1 1 1 Law (a) Proved Law (b)proved Law can be proved by perfect induction method. Associative Law Law 1 The associative law that one can group any two terms of sum,or any two of a product. In other words it allows grouping of variables. Ie This states that ORing of several variable the result is the same irrespective of the grouping of variables.thus A+(B+C) = (A+B)+C The above laws can be proved using induction method Proof by perfect induction method A B C B+C A+B A+(B+C) (A+B)+C 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 1 0 1 1 1 1 0 1 1 1 1 1 1 1 0 0 0 1 1 1 15
1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 Logical Implementation == > Law 2 The associative law of multiplication states that it makes no difference in what order the variables are grouped when ANDing several variables. As shown in Fig. This law as applied to AND gates. A.(B.C) = (A.B).C The above laws can be proved using induction method Proof by perfect induction method A B C B.C A.B A.(B.C) (A.B).C 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 1 1 0 0 1 0 0 1 1 1 1 1 1 1 Logical Implementation == > Distributive law The distributive laws states that factoring or multiplication of different term in an expression is allowed. They are expressed ad follows: a) A.(B+C) = AB + AC b) A+(B.C) = (A+B)(A+C) LAW 1 : 16
The distributive law states that ORing several variables and ANDing the result with a single variable is equivalent to ANDing the result with a single variable with each of the several variables and then ORing the products. The Fig. illustrates this law in terms of gate implementation. Proof by perfect Induction Method A.(B+C) = AB + AC A+(B.C) = (A+B)(A+C) A B C B+C A.B A.C A.(B+C) A.B+A.C A+(BC) (A+B)(A+C) 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0 1 1 1 0 1 1 0 1 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Logical Implementation of the Law 1 LAW 2 The distributive law states that ORing several variables and ANDing the result with a single variable is equivalent to ANDing the result with a single variable with each of the several variables and then ORing the products. The Fig. illustrates this law in terms of gate implementation. Proof by perfect Induction Method A.(B+C) = AB + AC A+(B.C) = (A+B)(A+C) A B C B+C A.B A.C A.(B+C) A.B+A.C A+(BC) (A+B)(A+C) 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0 1 1 1 0 1 1 0 1 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 17
Q.16.State and Prove Demorgan s Theorem Ans. This theorem are named behind the discoverer Bas Augustus Demorgan. The use of these theorems enables us to realize OR operation by using AND-NAND family gates or vice-versa. Demorgans 1st theorem Demorgan 1 st theorem states that The complement of a sum is equal to the product of the complement. A+B = A.B Proof: By perfect induction method or by truth table. LHS RHS A B A+B A+B A B A.B 0 0 0 1 1 1 1 0 1 1 0 1 0 0 1 0 1 0 0 1 0 1 1 1 0 0 0 0 Therefore LHS = RHS Hence Theorem is proved two truth table are identical.fig. Logical Implementation of DMT1 Hence according to Demorgan s 1 st theorem NOR gate = Bubbled AND gate Demorgan s 2nd theorem The second theorem states that The complement of a product is equal to the sum of the complement. A.B = A+B Proof: By perfect induction method: LHS RHS A B A.B A.B A B A+B 0 0 0 1 1 1 1 0 1 0 1 1 0 1 1 0 0 1 0 1 1 1 1 1 0 0 0 0 18
Therefore LHS = RHS Since two truth table are identical hence Demorgan s 2 nd theorem is proved. LHS = A.B RHS = A+B LHS = RHS Hence it is proved that NAND gate = Bubbled OR gate. Note. For Simple remembrance it is Change the Sign and Break the Line Q.17.State and Prove Duality Theorem Ans.The duality theorem is one of those elegant theorems proved in advanced mathematics. Duality theorems says, starting with a Boolean relation, one can derive another Boolean relation by a) Change each OR sign to AND sign. b) Change each AND sign to OR sign. c) Complementing any 0 to 1 appearing in the expression. A+0 = A A.1 = A This dual property is obtained by changing the OR sign to an AND sign and by complementing the 0 to get 1. E.g.: A(B+C) = AB+AC By changing each OR and AND operation we get the dual relation AB+AC = (A+B)(A+C) By changing each AND and OR operation we get the dual relation A+BC = (A+B)(A+C) Same can be proved using truth table method. Expected by the students Q.18.List all the standard Theorems used in Boolean Algebra Ans.Standard Theorems 19
Boolean Theorems 1. A+0=A 2. A.1=A 3. A+1=1 4. A.0=0 5. A+A=A 6. A.A=1 7. A+A=1 8. A.A=0 9. A.(B+C) = AB+AC 10. A+BC=(A+B)(A+C) 11. A+AB=A 12. A(A+B)=A 13. A+AB=(A+B) 14. A(A+B)=AB 15. AB+AB=A 16. (A+B)(A+B)=A 17. AB+AC =(A+C)(A+B) 18. (A+B)(A+C)=AC+AB 19. AB+AC+BC=AB+AC 20. (A+B)(A+C)(B+C)=(A+B)(A+C) 21. A.B.C...= A+B+C... 22. A+B+C+... = A.B.C... Board Solved Questions Q.19.Solve using Boolean Algebra Ans. Y = (A+B)(A+C) = AA +AC +AB + BC = A + AC + AB + BC since A.A = A = A(1+C+B) +BC Since 1+C+B = 1 Y= A+BC Q.20. 20