Digital Electronics Basics - Chapter 1: Logic Gates & Boolean Algebra Publish Date: Mar 27, 2013 Overview The Digital Electronics Basics series present the fundamental theories and concepts taught at entry level electronics courses a both 2 year and 4 year institutions. This series of content provides examples to professors to enable them to easily teach conce to students, who can develop a solid underlying knowledge of digital electronics using NI solution. This series focuses on some the basic theory as well as providing the NI Multisim circuits to enable practical implementation and experimentation as homew for students. Table of Contents 1. 2. 3. 4. 5. 6. 7. 8. In this Chapter Example Courses Basic Logic Gates Boolean Algebra Example Exercise Example Problem NI Suggested Solution References 1. In this Chapter We begin this chapter by studying the basic logic gates and understanding the fundamentals as well as the basic rules of Boole algebra and expression simplification. Then we examine an example circuit that can be used by any educator or student to veri our results using NI Multisim. If you do not have NI Multisim installed on your computer you can download a free 30 day evaluation at http://www.ni.com/multisim/try/ (http://www.ni.com/multisim/try/) 2. Example Courses Listed below are example courses that teach this concept at their schools. Course Name School Learn More Digital Electronics Basics Macomb Community College http://www.macomb.edu/noncms/search/courses/coursekey.asp?coursekey=ELEC-1211 Digital Circuits 1 Henry Ford Community College https://my.hfcc.edu/site_manager/Catalog_Manager/courses/view_course1.asp?id=2158 3. Basic Logic Gates Logic gates constitute the foundation blocks for digital logic. Let us start by reviewing these gates and their truth tables: An AND Gate has two or more inputs and produces one output as follows: output = 1 if all of the inputs are high, output = 0 if on or more of the inputs are low [1]. An OR gate also has two or more inputs and produces one output as follows: output = 1 if one or more inputs are high, output = if all inputs are low [1]: 1/5 www.ni.com The inverter gate has one input and produces one output as follows: output =1 if input is low, output = 0 if input is high [1]. The NAND gate has two or more inputs and produces one output as follows: output = 0 if all the inputs are high, output = 1 if an of the inputs are low [1]. The NOR gate has two or more inputs and produces one output as follows: output = 1 if all inputs are low, output = 0 if any of th inputs is high [1]. The Exclusive-OR gate always has two inputs only and produces one output as follows: output = 1 when inputs are not similar, output = 0 when inputs are the same [1]. The Exclusive-NOR gate always has two inputs only and produces one output as follows: output = 1 when inputs are both high are both low, output = 0 when inputs are not similar [1]. 4. Boolean Algebra 2/5 www.ni.com 4. Boolean Algebra Boolean algebra has similar rules to other algebras and these rules are used to manipulate the expression at hand. Some of th basic rules are [2]: One variable: A.A=A A+A=A One variable and 0 or 1: A.0=0 A.1=A A+0=A A+1=1 DeMorgan’s Theorem: (A + B)’ = A’ . B’ (A . B)’ = A’ + B’ Associative: (A . B) . C = A . (B . C) (A +B) + C = A + (B + C) Commutative: A.B=B.A A+B=B+A Distributive: A .(B + C) = A . B + A . C A + (B . C) = (A + B) . (A + C) Note: OR operator is represented by the ‘+’ symbol and has the lowest precedence. NOT operator is represented by the “ ‘ “ symbol and has the highest precedence. AND operator is represented by ‘.’ symbol and is in the middle [2]. 5. Example Exercise STEP 1: Simplify the following expression: ABC’D + AB’C’D + A’BCD + AB’CD + A’BCD’ [3] Answer Sub-Step 1: Using the above rules we can simplify the expression as follows [3]: ABC’D + AB’C’D + A’BCD + AB’CD + A’BCD’ = ABC'D + AB'C'D + A'BCD + A'BCD'+ AB'CD = AC'D(B+B') + A'BC(D+D') + AB'CD = AC'D(1) + A'BC(1) + AB'CD = AC'D + A'BC + AB'CD = AC'D + AB'CD + A'BC = AD(C'+B'C) + A'BC = AD((C'+B')(C'+C)) + A'BC = AD((C'+B')(1)) + A'BC = AD(BC)' + A'BC 6. Example Problem STEP 2: Using NI Multisim, open circuit file “logic_gates.ms12”. You will notice the circuit below. [4] The above circuit shows the different connections of logic gates used to control a machine (indicated by an LED) in a workshop There are On/Off switches, micro-switches, as well as emergency stop switches available (SW1 &SW2, SW3 & SW4, SW5 & S respectively). Answer Sub-step 2: Based on the circuit above, determine the switch combination that will turn the machine on. Based on the individual truth tables for each of the logic gates, we start from the far right working our way back to determin 3/5 www.ni.com Based on the individual truth tables for each of the logic gates, we start from the far right working our way back to determin the combination of bits or switches that will enable the LED to turn on or in other words the output of ‘U5’ to be equal to 1 [ Input Output SW1 & SW2 SW3 & SW4 SW5 & SW6 LED 11 11 00 1 11 11 01 1 11 11 10 1 01 11 00 1 01 11 01 1 01 11 10 1 10 11 00 1 10 11 01 1 10 11 10 1 STEP 3: Using circuit file “logic_gates.ms12”, toggle the switches to replicate our findings and verify our combinations. You will notice that the LED will turn on when the above combinations are selected as shown below: 7. NI Suggested Solution National Instruments offers a number of products that combine to provide a scalable and powerful teaching platform for educato The solution includes: NI Multisim circuit teaching environment: Combining an intuitive circuit definition environment, with powerful SPICE simulation technology, educators can use NI Multisim to easily teach the ins-and-outs of circuits in a safe environment. NI ELVIS teaching and measurement platform allows educators to provide students with a compact, all-in-one unit for their measurement and analysis needs. Combining an oscilloscope, function generator, DMM, bode analyzer and 8 other instrument into a small platform; it simplifies the laboratory experience for students and lab instructors. 8. References 4/5 www.ni.com 8. References [1] Bartelt, Terry. Wisconsin Technical College System. “Wisc-Online”. Basic Logic Gates. [http://www.wisc-online.com/Objects/ViewObject.aspx?ID=dig1302]. (11/03/2013) [2] Imperial College, London. Department of Computing. Lecture 1: An Introduction to Boolean Algebra. [http://www.doc.ic.ac.uk/~dfg/hardware/HardwareLecture01.pdf]. (11/03/2013) [3] Purdue University. College of Science, Department of Computer Sciense. Exercise on Boolean Algebra. [http://www.cs.purdue.edu/homes/cs250/solutions.html]. (11/03/2013) [4] Technical University. VINACeL online training portal of Technical University. Discover Circuits. [http://vinacel.hcmute.edu.vn/vimach/Contents/Phu_luc/Appendix_C.htm]. (11/03/2013) Customer Reviews 1 Review | Submit your review ( http://zone.ni.com/apps/utf8/nidz_display_comments.create_comment?p_title=Digital+Electronics+Basics+-+Chapter+1%3A+L ) PRODUCT SUPPORT COMPANY Order status and history (http://www.ni.com/status/) Submit a service request ( https://sine.ni.com/srm/app/myServiceRequests) Order by part number ( http://sine.ni.com/apps/utf8/nios.store?action=purchase_form Manuals (http://www.ni.com/manuals/) ) Drivers (http://www.ni.com/downloads/drivers/) Activate a product ( http://sine.ni.com/myproducts/app/main.xhtml?lang=en Alliance Partners (http://www.ni.com/alliance/) ) About National Instruments ( http://www.ni.com/company/) Events (http://www.ni.com/events/) Careers (http://www.ni.com/careers/) Order and payment information ( http://www.ni.com/how-to-buy/) MISSION NI equips engineers and scientists with systems that accelerate productivity, innovation, and discovery. (http://twitter.com/niglobal) ( http://www.facebook.com/NationalInstruments) ( http://www.linkedin.com/company/3433?trk=tyah) (http://www.ni.com/rss/) ( http://www.youtube.com/nationalinstruments) Contact Us (http://www.ni.com/contact-us/) (http://privacy.truste.com/privacy-seal/National-Instruments-Corporation/validation?rid=bc6daa8f-7051-4eea-b7b5-fb24dcd96d95) Legal (http://www.ni.com/legal/) | © National Instruments. All rights reserved. | Site map ( http://www.ni.com/help/map.htm) 5/5 www.ni.com