LABORATORY11: Digital Logic Circuits General Engineering Polytechnic University
Overview Objectives Logic Functions Sample Problem Truth Table Boolean Equation Karnaugh Maps (K-maps) Simplified Boolean Equation Combinational Logic Circuit Integrated Circuits (ICs) IC Identification Digital Logic Trainer Materials for Lab Problem Statement Procedure Written Assignment Written Topics Recitation Topics Closing
Objectives Understand the functions of logic gates Become familiar with digital circuits Use you new knowledge to design & implement a combinational logic circuit using the digital trainer
Logic Functions AND - “The all or nothing operator” Output is high (1) only when ALL inputs are high (1) OR gate - “The any or all operator” Output is high (1) when at least ONE input is high (1) NOT (INVERTER) operator Output is opposite of input Only one input and one output
Logic Functions AND OR NOT Logic Function Logic Symbol Boolean Ā B Y A • B = Y A + B = Y A = Ā AND OR NOT Logic Function Logic Symbol Boolean Expression Truth Table Inputs Outputs 1
Sample Problem An ATM machine has three options, Print statement, Withdraw money, or Deposit Money The ATM machine will charge you $1.00 if you: Want to withdraw Only want to print out your statement (no transactions at all)
Truth Table INPUTS OUTPUT P W D C 1 A truth table is a table that displays all possible input combinations and the resulting outputs. INPUT OUTPUT P = print C = charge W = withdraw D = deposit 0 = “do not” 0 = $0.00 1 = “do” 1 = $1.00 INPUTS OUTPUT P W D C 1
Boolean Equation = PWD C = + PWD + PWD + PWD + PWD INPUTS OUTPUT P W D Outputs with a value of “ONE” are kept INPUTS OUTPUT P W D C 1 = PWD C = + PWD + PWD + PWD + PWD
Karnaugh Maps (K-maps) Place output ONE in corresponding boxes. Circle neighboring ONES in multiples of 2, try to find the greatest amount of “neighbors” Only overlap circles as a last resort Karnaugh Maps (K-maps) C = PWD+ PWD+ PWD + PWD + PWD PWD PWD PWD 1 1 1 1 P W P W P W P W D 1 1 1 1 D 1 1 _ Why can’t you switch PW and PW? Why can’t you loop the three adjacent 1s in the top row together?
Karnaugh Maps (K-maps) C = PWD+ PWD+ PWD + PWD + PWD W P D 1 NOTE:Circle neighboring ONES in multiples of 2. Try to find the greatest amount of “neighbors.” Only overlap circles as a last resort
Simplified Boolean Equation 1 _ _ PWD _ Opposite values cancel out P W D 1 W C = 1 _ PWD _ _ _ + PD
Simplified Boolean Equation Opposite values in circles cancel out P W D _ _ PWD _ = W 3 Step 1 2 4 1 _ PWD _ _ = PD Step 1 C = W + PD
Combinational Logic Circuit W C = W P D + W P D + W P D + W P _ PD P D + P D _ D D
Integrated Circuits (ICs) Used to implement combinational logic circuits We use the TTL family (transistor transistor logic)
IC Identification Y 6 Y 5 Y 4 Y 3 Y 2 Y 1 A 6 A 5 A 4 A 3 A 2 A 1 V cc 14 2 4 5 6 7 3 8 9 10 11 12 13 Y 6 Y 5 Y 4 Y 3 Y 2 Y 1 A 6 A 5 A 4 A 3 A 2 A 1 V cc GND B 1 B 2 A 4 A 3 A 2 A 1 B 3 B 4 Y 4 Y 3 Y 2 Y 1 V cc GND 1 14 2 4 5 6 7 3 8 9 10 11 12 13 7404 Inverter Chip 7408 AND Chip 7432 OR Chip 1 14 2 4 5 6 7 3 8 9 10 11 12 13 A 4 A 3 A 2 A 1 Y 4 Y 3 Y 2 Y 1 V cc GND B 4 B 3 B 2 B 1
Digital Logic Trainer Complete diagram on page 98 Breadboard Points with a line through them represent the same connection line IC Chip
Materials for Lab Digital/Analog Trainer 7432 2-Input OR gate IC 7408 2-Input AND gate IC 7404 Hex Inverter (NOT gate) IC Hook-up Wire Computer equipped with LabVIEW
Problem Statement A farmer has two barns A hen is free to move about. A supply of corn is moved periodically from one barn to the other. He wants to protect the hen from a predator fox, and also prevent the hen from eating the supply of corn. An engineering student is hired to design an alarm system, using digital electronics. It will activate under the following conditions: The fox and the hen are in the same barn. The hen and the corn supply are in the same barn.
Problem Statement Design a combination logic circuit that will accomplish this task. The design should be cost effective, using the least amount of gates and input variables. The logical output of the circuit should be connected to a lamp. The lamp being “on” indicates alarm activation The lamp being “off” indicates alarm deactivation. The fox and hen and corn must be present in either barn 1 or barn 2 Presence in barn 1=“1” Presence in barn 2=“0”
Procedure Truth Table Determine what are the input variables and the output variable Decide how many combinations there should be Create and complete the truth table on a sheet of paper Truth Table Boolean Expression K-Map Simplified Boolean Expression Logic Circuit Digital Trainer LabVIEW Simulation
Procedure Boolean Expression Gather all the combinations that produced a “1” for the output Create a Boolean expression from these smaller expressions Truth Table Boolean Expression K-Map Simplified Boolean Expression Logic Circuit Digital Trainer LabVIEW Simulation
Procedure K-Map Create a K-Map table Be sure to only have one variable change states at a time from one box to another Use the Boolean expression to fill in the “1’s” Truth Table Boolean Expression K-Map Simplified Boolean Expression Logic Circuit Digital Trainer LabVIEW Simulation
Procedure Simplified Boolean Expression Use the K-Map to circle the pairs of 1’s The 1’s may only be circled in multiples of 2, starting from the largest possible combination and working its way down Write down the new simplified expression Truth Table Boolean Expression K-Map Simplified Boolean Expression Logic Circuit Digital Trainer LabVIEW Simulation
Procedure Logic Circuit Diagram Use the new simplified expression to design a logic circuit Have your instructor check your work Truth Table Boolean Expression K-Map Simplified Boolean Expression Logic Circuit Digital Trainer LabVIEW Simulation
Procedure Digital Trainer Do NOT plug anything in until your instructor has looked over your work Use the logic circuit and IC chip diagram to create the actual circuit on the breadboard Be sure to connect each of the ICs to Ground and VCC - 5V Truth Table Boolean Expression K-Map Simplified Boolean Expression Logic Circuit Digital Trainer LabVIEW Simulation
Procedure LabVIEW Simulation With the use of your logic circuit diagram - recreate the circuit in LabVIEW The front panel should have three control switches representing the variables and one Boolean indicator to represent the output HINT: LabVIEW has the following built in comparison functions: Truth Table Boolean Expression K-Map Simplified Boolean Expression Logic Circuit Digital Trainer LabVIEW Simulation NOT AND OR
Written Assignment Full Team Report (one report per team) Use the guidelines on page 5 for help Include original data with instructor’s initials Original tables and work should be re-written so it is legible Include a printout of the LabVIEW front and diagram panel Include the topics found on the next slide Remember to create a title page What are possible applications of digital electronics? Account for any errors made during the lab. Compare the problem before and after it was simplified. What are some advantages of minimization using digital logic? How would the digital circuit and its design be affected if barn one had an bell and barn two had an alarm horn? Explain how the Boolean equation is found using the truth table. State rules that one must follow when labeling K-maps and grouping the 1’s. From the K-map, how is the simplified Boolean equation found?
Written Topics Each of the following topics must be addressed in the full report and should be placed in the proper sections What are possible applications of digital electronics? Account for any error made during the lab Compare the problem before and after it was simplified What are some advantages of minimization using digital logic? What are possible applications of digital electronics? Account for any errors made during the lab. Compare the problem before and after it was simplified. What are some advantages of minimization using digital logic? How would the digital circuit and its design be affected if barn one had an bell and barn two had an alarm horn? Explain how the Boolean equation is found using the truth table. State rules that one must follow when labeling K-maps and grouping the 1’s. From the K-map, how is the simplified Boolean equation found?
Recitation Topics If your design did not work the first time, discuss why Discuss how the digital circuit and its design would be affected if barn one had an alarm bell and barn two has an alarm horn
Closing Return all the equipment back to your instructor