Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Digital Logic & Computer Architecture Practical Book by Yasir Ahmed Khan

3,685 views

Published on

Digital Logic & Computer Architecture Practical Book by Yasir Ahmed Khan

Published in: Education
  • Be the first to comment

Digital Logic & Computer Architecture Practical Book by Yasir Ahmed Khan

  1. 1. QUAID-E-AWAM UNIVERSITY OF ENGINEERING SCIENCE & TECHNOLOGY NAWABSHAH DEPARTMENT OF INFORMATION TECHNOLOGYDigital Logic & Computer Architects (3rd Term, 2nd Year) PRACTICAL # 01 OBJECTIVE: To Become Familiar With Basic Binary Operation. TOOL: Electronic Work Bench V 5.12 EQUIPMENT AND COMPONENTS:  Logic Gates  Indicator (LED)  Two Switches  Ground  Voltage Source AND Gate: Logic Expression: A.B= Y Logic Symbol: Truth Table: INPUTS OUTPUT A B Y 0 0 0 0 1 0 1 0 0 1 1 1 Explanation: The AND gate is a logic device whose output is 1 if and only if all its inputs are 1. In other words the output of an AND gate is 0 if any one or both its inputs are 0. It can have two or more inputs can only one output. It is also called an all or nothing gate, because it produces a 1 only in one case when all its inputs are a 1. In all other cases its output is zero.
  2. 2. QUAID-E-AWAM UNIVERSITY OF ENGINEERING SCIENCE & TECHNOLOGY NAWABSHAH DEPARTMENT OF INFORMATION TECHNOLOGYDigital Logic & Computer Architects (3rd Term, 2nd Year) PRACTICAL # 01 OR Gate: Logic Expression: A+B= Y Logic Symbol: Truth Table: INPUTS OUTPUT A B Y 0 0 0 0 1 1 1 0 1 1 1 1 Explanation: The OR gate is a logic device whose output is 1 if at least one if its input is 1. In other words the output of an OR gate is 0 if both its inputs are 0. It is also called any or all gate, because it produces a 1 even if one of its inputs is at 1. It produces a 0 only when all the inputs are 0.
  3. 3. Viva Question:Q: 1 why we use logic Gates?Ans: Logic gates are used to make logic circuits.Q: 2 Advantages of logic gates?Ans: Logic gates are basic components of microprocessors. Without them, electronicssystems couldnt run.Q: 3 what is also called NOT gate?Ans: The NOT gate also called INVERTER.Q: 4 Where output of AND Gate is high and low?Ans: If both inputs are high the output will be high/true/on else output of AND gate islow/false/off.
  4. 4. QUAID-E-AWAM UNIVERSITY OF ENGINEERING SCIENCE & TECHNOLOGY NAWABSHAH DEPARTMENT OF INFORMATION TECHNOLOGYDigital Logic & Computer Architects (3rd Term, 2nd Year) PRACTICAL # 02 OBJECTIVE: To implement and verify the NOR gate, NAND gate operations. TOOL: Electronic Work Bench V 5.12 EQUIPMENT AND COMPONENTS:  Logic Gates  Indicator (LED)  Two Switches  Ground  Voltage Source NOR Gate: Logic Expression: ( A + B)¯ = Y Logic Symbol: Truth Table: INPUTS OUTPUT A B Y 0 0 1 0 1 0 1 0 0 1 1 0 Explanation: The NOR gate is a device whose out is 1 if and only if all inputs are at 0. In all other cases the output is 0. The name NOR is derived from NOT-OR, because the gate performs the same logic as OR gate followed by an inverter. It is a universal gate. It can also be used as an inverter.
  5. 5. QUAID-E-AWAM UNIVERSITY OF ENGINEERING SCIENCE & TECHNOLOGY NAWABSHAH DEPARTMENT OF INFORMATION TECHNOLOGYDigital Logic & Computer Architects (3rd Term, 2nd Year) PRACTICAL # 02 NAND Gate: Logic Expression: ( A . B)¯ = Y Logic Symbol: Truth Table: INPUTS OUTPUT A B Y 0 0 1 0 1 1 1 0 1 1 1 0 Explanation: The NAND gate is a device whose output is 1 if at least one of its inputs is 0. Thus the output is 0 when all its inputs are 1. The name NAND is derived from NOT-AND because the gate performs the same logic as AND gate followed by an inverter. It is a universal gate as all basic gates can be derived from it. It can also be used as an inverter. VIVA QUESTIONS Q: 1 NOR gate is combination of? Ans: NOR gate is the combination of OR gate and NOT gate. Q: 2 NAND gate is combination of? sAns: NAND gate is combination of AND gate and NOT gate. Q: 3 Where output of NOR gate is high and low? Ans: If any one or both input is high the output will be low else output will high. Q: 4 where output of NAND gate is high and low? Ans: If both input high the output will be low else output will high.
  6. 6. QUAID-E-AWAM UNIVERSITY OF ENGINEERING SCIENCE & TECHNOLOGY NAWABSHAH DEPARTMENT OF INFORMATION TECHNOLOGYDigital Logic & Computer Architects (3rd Term, 2nd Year) PRACTICAL # 03 OBJECTIVE: To understand the operation of EX-OR & EX-NOR gates. TOOL: Electronic Work Bench V 5.12 EQUIPMENT AND COMPONENTS:  Logic Gates  Indicator (LED)  Two Switches  Ground  Voltage Source EX-OR Gate: Logic Expression: F = x‟y + xy‟ Logic Symbol: Truth Table: INPUTS OUTPUT X Y F 0 0 0 0 1 1 1 0 1 1 1 0 Explanation: If inputs are similar output of X-OR gate will be “low” (0). If inputs are dissimilar or change than output of X-OR gate will be “High” (1).
  7. 7. EX-NOR Gate:Logic Expression: F = x‟ y „ . x yLogic Symbol:Truth Table: INPUTS OUTPUT X Y F 0 0 1 0 1 0 1 0 0 1 1 1Explanation: If inputs are similar output of X-NOR gate will be “High” (1). If inputs are dissimilar or change than output of X-OR gate will be “Low” (0). Viva Question:Q.01: What is operation of EX-OR gate?ANS: If inputs are similar output of EX-OR gate will be low. If inputs are dissimilar orchange than output of EX-OR gate will be high.Q.02: What is operation of EX-NOR gate?ANS: If inputs are similar output of EX-NOR gate will be high. If inputs are dissimilar orchange than output of EX-NOR gate will be low.
  8. 8. QUAID-E-AWAM UNIVERSITY OF ENGINEERING SCIENCE & TECHNOLOGY NAWABSHAH DEPARTMENT OF INFORMATION TECHNOLOGYDigital Logic & Computer Architects (3rd Term, 2nd Year) PRACTICAL # 04 OBJECTIVE: To Design the circuit of the Boolean expression & verify the result through truth table. TOOL: Electronic Work Bench V 5.12 EQUIPMENT AND COMPONENTS:  Logic Gates  Indicator (LED)  Two Switches  Ground  Voltage Source 1. F= (a.b) (b`+c) Truth Table: S.No A B C F 0 0 0 0 0 1 0 0 1 0 2 0 1 0 0 3 0 1 1 0 4 1 0 0 0 5 1 0 1 0 6 1 1 0 0 7 1 1 1 1
  9. 9. 2. F= (a`+b`) (c`+d) (d+c)Truth Table: S:NO A B C D F 0 0 0 0 0 0 1 0 0 0 1 1 2 0 0 1 0 0 3 0 0 1 1 1 4 0 1 0 0 0 5 0 1 0 1 1 6 0 1 1 0 0 7 0 1 1 1 1 8 1 0 0 0 0 9 1 0 0 1 1 10 1 0 1 0 0 11 1 0 1 1 1 12 1 1 0 0 0 13 1 1 0 1 0 14 1 1 1 0 0 15 1 1 1 1 0
  10. 10. 3. F= {(x`+y) `+(x+y) `+(y+z`)}Truth Table: S:NO X Y Z F 0 0 0 0 1 1 0 0 1 1 2 0 1 0 0 3 0 1 1 1 4 1 0 0 0 5 1 0 1 0 6 1 1 0 1 7 1 1 1 1
  11. 11. 4. F= [(a+b+c) `] [(d`e)]Truth Table: S:NO A B C D E F 0 0 0 0 0 0 0 1 0 0 0 0 1 0 2 0 0 0 1 0 0 3 0 0 0 1 1 0 4 0 0 1 0 0 0 5 0 0 1 0 1 1 6 0 0 1 1 0 0 7 0 0 1 1 1 0 8 0 1 0 0 0 0 9 0 1 0 0 1 1 10 0 1 0 1 0 0 11 0 1 0 1 1 0 12 0 1 1 0 0 0 13 0 1 1 0 1 1 14 0 1 1 1 0 0 15 0 1 1 1 1 0
  12. 12. QUAID-E-AWAM UNIVERSITY OF ENGINEERING SCIENCE & TECHNOLOGY NAWABSHAH DEPARTMENT OF INFORMATION TECHNOLOGYDigital Logic & Computer Architects (3rd Term, 2nd Year) PRACTICAL # 05 OBJECTIVE: To observe the operation of logic converter. TOOL: Electronic Work Bench V 5.12 EQUIPMENT AND COMPONENTS:  Logic Gates  Indicator (LED)  Two Switches  Ground  Voltage Source THEORY: The logic converter is able to perform several transformations of a circuit representation. It has no real-world counterpart. It can be attached to a circuit to derive the truth table or Boolean expression the circuit embodies, or used to produce a circuit from a truth table or Boolean expression. PROCEDURE: 1. First we open the electronic workbench. 2. Get an OR gate. 3. Two NOT gates and tow AND gates from logic gates and one converter. 4. Connect inputs to left side of converter and output to the right side of the converter.
  13. 13. TO CONSTRUCT A TRUTH TABLE:1. Click the number of input channels you want, from a to H, across the top of the logicconverter. The display area below the terminals fills up with the necessary combinations ofones and zeros to fulfill the input conditions. The values in the output column on the right areinitially set to 0.2. Edit the output column to specify the desired output for each input condition.To change an output value, select it and type a new value: 1, 0 or x. (An x indicates thateither 1 or 0 is acceptable.) To convert a truth table to a Boolean expression, click the Truth Table to BooleanExpression button.The Boolean expression will be displayed at the bottom of the logic converter.To convert a truth table to a simplified Boolean expression, or to simplify an existingBoolean expression, click the Simplify button which is shown in the figure.RESULT:  The result is observed by the logic converters.
  14. 14. QUAID-E-AWAM UNIVERSITY OF ENGINEERING SCIENCE & TECHNOLOGY NAWABSHAH DEPARTMENT OF INFORMATION TECHNOLOGYDigital Logic & Computer Architects (3rd Term, 2nd Year) PRACTICAL # 06 OBJECTIVE: Task 1: Design full adder circuit. Task 2: Design a BCD to Excess-3 code converter. TOOL: Electronic Work Bench V 5.12 EQUIPMENT AND COMPONENTS:  Logic Gates  Indicator (LED)  Two Switches  Ground  Voltage Source THEORY: FULL ADDER: A full adder is a combinational circuit that performs an arithmetic sum of three input bits and produces two outputs.
  15. 15. BCD TO EX-3:The BCD to Ex-3 code uses four bit to represent a decimal digits there must be four inputVariable.
  16. 16. QUAID-E-AWAM UNIVERSITY OF ENGINEERING SCIENCE & TECHNOLOGY NAWABSHAH DEPARTMENT OF INFORMATION TECHNOLOGYDigital Logic & Computer Architects (3rd Term, 2nd Year) PRACTICAL # 07 OBJECTIVE: Design a combinational circuit the multiply two numbers of two bit each TOOL: Electronic Work Bench V 5.12 EQUIPMENT AND COMPONENTS:  Logic Gates  Indicator (LED)  Two Switches  Ground  Voltage Source
  17. 17. TRUTH TABLE: a1 a0 b1 b0 w x y z 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 1 1 0 0 0 1 0 0 1 1 1 0 0 1 1 1 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 1 0 1 0 0 1 0 0 1 0 1 1 0 1 1 0 1 1 0 0 0 0 0 0 1 1 0 1 0 0 1 1 1 1 1 0 0 1 1 0 1 1 1 1 1 0 0 1

×