EET105 Fall 2018 Digital Electronics Charles Rubenstein Ph
EET-105 – Fall 2018 Digital Electronics Charles Rubenstein, Ph. D. Adjunct Professor of Engineering Session 3: WED 09/12/18 /*/ FRI 09/07/18 Mon/Wed: 9: 25 am – 11: 15 am // Wed/Fri: 11: 40 am – 1: 30 pm Lupton Hall 247 1
105 Mon/Wed: Teams Chart To be adjusted as needed NEXT WEEK 12 11 10 Kasey Najendra Brandon Michael V Kevin Al 8 7 6 Basher Christina Muhammad Rich ? Ronald Connor 4 3 2 Xhovani Kenny Nick Michael S Jino 9 Milos James 5 Sam Xiao 1 Urfa Mark Instructor Station Copyright © 2018 C. P. Rubenstein 2
105 Wed/Fri: Teams Chart To be adjusted as needed NEXT WEEK 12 11 10 Steven David Roel Shane Jamie Andre 8 7 6 Alan Anthony B Jeremy Elijah Anthony Farzan 4 3 2 Joe Muhammad Jordan Matt Israel Vinny 9 Talha Victor 5 Michael Mike 1 Jackie Amar Instructor Station Copyright © 2018 C. P. Rubenstein 3
Instructor Contact Information Dr. Charles Rubenstein <c. rubenstein@ieee. org> Adjunct Professor of Engineering Office hours (by appointment *) in LH 247 Mon: 9: 00 am – 9: 20 am Wed: 9: 00 am – 9: 20 am Fri: 11: 00 am – 11: 30 am (*Please email me at least a day in advance if you plan on coming to office hours…) Send me an email … Subject line: 105 Copyright © 2018 C. P. Rubenstein 4
** World Maker Faire – NY ** For the seventh year, Dr. Rubenstein will be coordinating the IEEE (Sponsored by Region 1, IEEE-USA, EAB and The IET) at the Booth World Maker Faire New York NY Hall of Science - Queens, NY Saturday-Sunday 22 -23 September 2018 Copyright © 2018 C. P. Rubenstein 5
Class Session Archives http: //www. Charles. Rubenstein. com/105/ 18 fa 03. pdf (Class Power. Point slides) * 18 fa 03_h. pdf (slides in handout format) * *Archive materials are normally online four days after class Copyright © 2018 C. P. Rubenstein 6
EET 105 – Digital Circuits 1 Chapters & Topics covered in this Class: Tocci, et al: Digital Systems – principles & applications CHAPTER 1: Introductory Concepts CHAPTER 2: Number Systems and Codes CHAPTER 3: Describing Logic Circuits CHAPTER 4: Combinational Logic Circuits CHAPTER 6: Digital Arithmetic: Operations and Circuits CHAPTER 9: MSI Logic Circuits Copyright © 2018 C. P. Rubenstein 7
EET 105 – Digital Electronics Lab Manual - Table of Contents 1. Logic Gates 2. Simple Logic Circuits 3. Logic Circuits using NAND/NOR gates 4. Majority Circuits 5. Exclusive OR gates 6. Adder Circuits 7. Code Conversion using Combinational Circuits 8. BCD-to-Seven Segment Display Decoder/Driver 9. Multiplier 10. Comparator 11. Decoder 12. Multiplexer Copyright © 2018 C. P. Rubenstein 8
EET 105 Class Schedule Preliminary, subject to change Mon/Wed: Wed/Fri: 01 02 5 -Sep 31 -Aug 10 -Sep 5 -Sep 12 -Sep 7 -Sep 12 -Sep 19 -Sep 14 -Sep 24 -Sep 19 -Sep 21 September 2018 26 -Sep Class Session Topic 1. Syllabus Overview, Decimal and Binary Number Systems 2. Octal and Hex Number Systems; OR, AND, NOT Gates 3. Boolean Algebra; Logic Circuits; Truth Tables; NOR, NAND 4 L 1. Equipment Review; IC Pin Diagrams; LAB 1: Logic Gates 5 L 2. LAB 2: Simple Logic Circuits 6 L 3. LAB 3: Logic circuits using NAND/NOR Gates OPEN LAB SESSION EXAM 1 - Wednesday 26 September Copyright © 2018 C. P. Rubenstein 9
In Today’s Class: • 2 Do: Review Lab Team Partner Assignments • 2 Do: Class Lecture material: OR, AND and NOT Operations Combining & Evaluating Logic Circuits Implementing Boolean Expressions NAND and NOR Gates • 2 Do: Review Lab Equipment (time permitting) Copyright © 2018 C. P. Rubenstein 10
Questions? Copyright © 2018 C. P. Rubenstein 11
Review Digital Number Systems DECIMAL = Base 10 Binary = Base 2 Octal = Base 8 Hexadecimal = Base 16 Copyright © 2018 C. P. Rubenstein 12
Decimal Numbers Powers of Ten into a ‘real’ number Although we use decimals so often don’t think of it the way it is constructed, we can break a decimal number into its ‘powers of 10’ with coefficients “an”: an x 10 n + an-1 x 10 n-1 + … + a 1 x 101 + a 0 x 100 To convert a number in this decimal notation 4 x 103 + 5 x 102 + 0 x 101 + 7 x 100 into a common ‘number’ we merely write the coefficients. 103 = 102 = 101 = 1000 10 1 4 5 0 7 We include ALL zero ‘place holders’ to yield 4, 507. Note that we use a comma every three places to more easily understand the number: 1, 234, 567 (etc. ). Copyright © 2018 C. P. Rubenstein 13
Binary Numbers Powers of Two into a ‘real’ number Just as we did with decimals, we can break a binary number into its ‘powers of 2’ with coefficients “an”: an x 2 n + an-1 x 2 n-1 + … + a 1 x 21 + a 0 x 20 To convert a number in this binary notation 1 x 23 + 1 x 22 + 0 x 21 + 1 x 20 into a common ‘number’ we merely write the coefficients: 23 = 22 = 21 = 20 = 8 4 2 1 1 1 0 1 Include zero ‘place holders’ to yield the binary 1101 (1310). Note that we can readily see that we can create a decimal number from a binary number by adding the individual powers when “ 1” Copyright © 2018 C. P. Rubenstein 14
Octal Numbers To convert an Octal number, say 277, into decimal notation: an x 8 n + an-1 x 8 n-1 + … + a 1 x 81 + a 0 x 80 We can fill in the ‘chart’ 83 = 82 = 81 = 80 = 512 64 8 1 0 2 7 7 or just put the coefficients “an” into the above formula: 277 Octal = 2 x 82 + 7 x 81 + 7 x 80 = 2 x 64 + 7 x 8 + 7 x 1 = 128 + 56 + 7 = 191 decimal 277 Octal = 2778 = 191 Decimal Copyright © 2018 C. P. Rubenstein 15
Converting Binary to Octal Convert from binary to octal is done by grouping bits in three starting with the LSB. Each group is then converted to the octal equivalent. The binary number in groups of three bits is converted to its equivalent octal digit: Example: Convert the ten binary bits 11101001102 to Octal: FIRST add two leading zeros to fill out four groups of 3 bits = 12 bits. Then ‘solve’… 1 6 4 68 83 = 82 = 81 = 80 = 512 64 8 1 1 6 4 6 Thus, 11101001102 = 16468 = 1646 Octal = 936 Decimal Copyright © 2018 C. P. Rubenstein 16
HEX Numbers To convert a Hex number, say 2 AF, into decimal notation: an x 16 n + an-1 x 16 n-1 + … + a 1 x 161 + a 0 x 160 We can fill in the ‘chart’ 163 = 162 = 161 = 160 = 4096 256 16 1 0 2 A F or just put the coefficients “an” into the above formula: 2 AF Hex = 2 x 162 + A x 161 + F x 160 We need to remember that “A” = 10 and “F” = 15 in Hex: = 2 x 256 + 10 x 16 + 15 x 1 = 512 + 160 + 15 = 687 decimal 2 AF Hex = 687 Decimal Copyright © 2018 C. P. Rubenstein 17
Converting Hex to Binary Note that Hex numbers can be broken down into groups of four (4) binary digits (or bits) = a nibble! Leading zeros can be added to the left of the MSB to fill out the last digits in a group. Example: Convert 9 F 216 to binary: Copyright © 2018 C. P. Rubenstein 18
Converting Binary to Hex Convert from binary to hex is done by grouping bits in four starting with the LSB. Each group is then converted to the hex equivalent. The binary number is grouped into groups of four bits and each is converted to its equivalent hex digit: Example: Convert the ten binary bits 11101001102 to Hex: FIRST add two leading zeros to fill out three groups of 4 bits = 12 bits. Then ‘solve’… Copyright © 2018 C. P. Rubenstein 19
Hexadecimal, Decimal & Binary Counting in the various digital number systems Copyright © 2018 C. P. Rubenstein 20
Counting in Hex When we count in Hexadecimal we count: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1 A, 1 B, 1 C, 1 D, 1 E, 1 F, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 2 A, 2 B, 2 C, 2 D, 2 E, 2 F, 30, … 3 E, 3 F, 40, … 4 F, 50 … 5 F, 60 … 6 F, 70, … 7 F, 80, … 8 F, 90 … 9 F, A 0 … AF, B 0, … BF, C 0, … CF, D 0 … DF, E 0 … EF, F 0, … FF, 100 … 1 FF, 200 … 2 FF and so on Copyright © 2018 C. P. Rubenstein 21
OR Operation with OR Gates The Boolean expression for the OR operation is: X = A + B Read this as “X equals A OR B” The + sign does not stand for ordinary addition—it stands for the OR operation The OR operation is similar to addition, but when A = 1 and B = 1, the OR operation produces: 1 + 1 = 1 not 1 + 1 = 2 In the Boolean expression x = 1 + 1 = 1 x is true (1) when A is true (1) OR B is true (1) OR C is true (1) Copyright © 2018 C. P. Rubenstein 22
2 -input OR Gates An OR gate is a circuit with two or more inputs, whose output is equal to the OR combination of the inputs. Truth table & circuit symbol for a two-input OR gate are: Copyright © 2018 C. P. Rubenstein 23
AND Operations with AND Gates The AND operation is similar to multiplication: X = A • B • C Read as “X equals A AND B AND C” The + sign does not stand for ordinary multiplication—it stands for the AND operation. x is true (1) when A AND B AND C are true (1) Truth table and 2 -input AND Gate symbol Copyright © 2018 C. P. Rubenstein 24
NOT (or inverter) Operation Truth Table and schematic symbol: NOT operation X = A’ = /A is read as X equals NOT A NOT Truth Table Whenever the input = 0, output = 1, and vice versa. NOTE: The bubble indicates the output is inverted. Copyright © 2018 C. P. Rubenstein 25
Questions? Copyright © 2018 C. P. Rubenstein 26
OR, AND, and NOT Gates Copyright © 2018 C. P. Rubenstein 27
OR, AND, NOT Operations These three basic Boolean Operations OR, OR AND and NOT can describe ANY logic circuit! Copyright © 2018 C. P. Rubenstein 28
Describing Logic Circuits Algebraically If an expression contains both AND and OR gates, the AND operation will always be performed first, Unless there is a parenthesis in the expression: Copyright © 2018 C. P. Rubenstein 29
Operations with Inverters Whenever an INVERTER is present, the output is equivalent to input, with a bar over it or slash in front of it. – Input A through an inverter equals /A or A’ or A. Copyright © 2018 C. P. Rubenstein 30
More Logic Circuit Expressions With a total of four (4) inputs, we have 16 possible outputs… Copyright © 2018 C. P. Rubenstein 31
More Logic Circuit Expressions With a total of five (5) inputs, we have 32 possible outputs… Copyright © 2018 C. P. Rubenstein 32
Questions? Copyright © 2018 C. P. Rubenstein 33
Evaluating Logic Circuits Copyright © 2018 C. P. Rubenstein 34
Evaluating Logic Circuit Outputs - 1 Rules for evaluating a Boolean expression: – Perform all inversions of single terms. – Perform all operations within parenthesis. – Perform AND operations before an OR operation unless parenthesis indicate otherwise. – If an expression has a bar over it, perform operations inside the expression, and then invert the result. Copyright © 2018 C. P. Rubenstein 35
Evaluating Logic Circuit Outputs - 2 The best way to analyze a circuit made up of multiple logic gates is to use a truth table. – It allows you to analyze one gate or logic combination at a time. – It allows you to easily double-check your work. – When you are done, you have a table of tremendous benefit in troubleshooting the logic circuit. Copyright © 2018 C. P. Rubenstein 36
Evaluating Logic Circuits - 1 The first step, after listing all input combinations, is to create a column in the truth table for each intermediate signal (node). Node u has been filled as the complement of A Copyright © 2018 C. P. Rubenstein 37
Evaluating Logic Circuits - 2 The next step is to fill in the values for column v. Node v v =AB —-Node v should be HIGH when A (node u) is HIGH AND B is HIGH Copyright © 2018 C. P. Rubenstein 38
Evaluating Logic Circuits - 3 The third step is to predict the values for node w which is the logical product (ANDing) of B and C. - Node w This column is HIGH whenever B is HIGH AND C is HIGH Copyright © 2018 C. P. Rubenstein 39
Evaluating Logic Circuits - 4 The final step is to logically combine columns v and w to predict the output x. Node x Since x = v + w, the x output will be HIGH when v OR w is HIGH Copyright © 2018 C. P. Rubenstein 40
Determining Output Levels • Output logic levels can be determined directly from a circuit diagram. – Output of each gate is noted until final output is found. • Technicians frequently use this method. Copyright © 2018 C. P. Rubenstein 41
Logic Circuit Truth Tables Node t Node x Node u Node v Copyright © 2018 C. P. Rubenstein 42
Questions? Copyright © 2018 C. P. Rubenstein 43
Implementing Boolean Expressions Copyright © 2018 C. P. Rubenstein 44
Implementing Circuits It is important to be able to draw a logic circuit from a Boolean expression. Consider that… – The expression X = A • B • C could be drawn as a three-input AND gate. – A circuit defined by X = A + B would use a two-input OR gate with an INVERTER on one of the inputs. Copyright © 2018 C. P. Rubenstein 45
Implementing Boolean Expressions A circuit with output y = AC + BC + ABC contains three terms which are ORed OR together. This requires a three-input OR gate BUT… The A, B, and C inputs as well as A and C have to be generated and terms combined before the OR Gate can do its job… Copyright © 2018 C. P. Rubenstein 46
Implementing Boolean Expressions Here each OR gate input is an AND product term, NOTE: An AND gate with appropriate inputs can be used to generate each of these terms. Copyright © 2018 C. P. Rubenstein 47
Implementing x = (A + B) (B + C) One possible circuit diagram for this expression could be: Copyright © 2018 C. P. Rubenstein 48
Questions? Copyright © 2018 C. P. Rubenstein 49
NAND Gates and NOR Gates Copyright © 2018 C. P. Rubenstein 50
NOR and NAND Gates By Combining basic AND, AND OR, OR and NOT operations we can simplify the writing of Boolean expressions The output of NAND and NOR gates may be found by determining the output of an AND or the output of an OR gate, and then inverting it. The truth tables for NOR and NAND gates show they complement truth tables for OR and AND gates Copyright © 2018 C. P. Rubenstein 51
NOR Gates The NOR gate is an inverted OR gate. An inversion “bubble” is placed at the output of the OR gate, making the Boolean output expression x = A + B Copyright © 2018 C. P. Rubenstein 52
OR Gate Output Waveforms Consider that the OR Gate gives a 1 output when either input of a 2 -input OR Gate is at 1: OR: Inverting this waveform gives the output of a NOR Gate: NOR: Copyright © 2018 C. P. Rubenstein 53
NOR Gate Output Waveforms Of course we could do the analysis directly… Output waveform X of a NOR Gate for the input waveforms A and B are shown here Copyright © 2018 C. P. Rubenstein 54
NAND Gates The NAND Gate is an inverted AND gate. An inversion “bubble” is placed at the output of the AND gate, making the Boolean output expression x = AB Copyright © 2018 C. P. Rubenstein 55
NAND Gate Waveforms The output waveform X of a NAND gate for the input waveforms A and B is shown here Copyright © 2018 C. P. Rubenstein 56
NOR and NAND Gates Logic circuit with the expression x = AB • (C + D) using only NOR and NAND gates. Note: Although there are four (4) inputs, and a node and an output; there is no rule stating you must only show the four inputs (A, B, C, and D) and the output (X) in a truth table. Use as many columns as you have inputs, outputs and nodes, as well as any inverter helper columns for NAND and NOR gate outputs. Copyright © 2018 C. P. Rubenstein 57
Questions? Copyright © 2018 C. P. Rubenstein 58
Overview Digital Electronics Lab Equipment Copyright © 2018 C. P. Rubenstein 59
EET 105 Lab Equipment LD-2 Pencilbox: E&L Instruments with AC Adapter: Interplex Electronics Integrated Circuits Parts Kit: Farmingdale Copyright © 2018 C. P. Rubenstein 60
Digital Logic Trainer Copyright © 2018 C. P. Rubenstein 61
ICs on The Solderless Breadboard We will initially use integrated circuits that are in 14 -pin, dual-inline black plastic packages. Typically, there is a notch – which could also be a dot or depression – at one of the shorter ends of the IC. This indicates that the pin to the lower left of that indicator is PIN #1. IC Notch can be a dot or a depression ● Pin 1 Copyright © 2017 C. P. Rubenstein 62
Solderless Breadboard Connections Note carefully how the holes for your wires are interconnected… Across the top/bottom all together and on either side of trench: 5 together vertically Copyright © 2018 C. P. Rubenstein 63
ICs on The Solderless Breadboard WRONG WAY! WAY Pins 1 to 4 and 5 to 8 are shorted to each other! Placing the IC over the TRENCH is the IC Notch * can be a dot or a depression Trench Pin 1 CORRECT WAY! All pins allow up to four additional connections… Copyright © 2017 C. P. Rubenstein 64
Connecting Leads and Terminals General #69 Wire Stripper Red, Black, and Yellow connecting wires Jumper wires IC Puller Copyright © 2018 C. P. Rubenstein 65
Any Questions? Send me an email … c. rubenstein@ieee. org Copyright © 2018 C. P. Rubenstein 66
End Copyright © 2018 C. P. Rubenstein 67
- Slides: 67