DIGITAL LOGIC ELECTRICITY, GATES, COMPONENTS
DIGITAL LOGIC READING: APPENDIX C THROUGH C.3 The Student shall be able to: Define voltage, current, resistance, volts, amps, ohms. Recite ohm’s law Draw the symbol for AND, OR, XOR, NAND, NOR, NOT. Write mathematical statements using AND, OR, XOR, NOT. Prepare a truth table. Prepare a truth table for AND, OR, XOR, NOT. Design a circuit using Sum of Products. Design an efficient solution using a Karnaugh Map or K-Map. Define decoder, multiplexor, parity, adder, and recognize their circuit diagrams. Design a circuit with Logic Circuit
ELECTRICITY Voltage = Depth Current = Speed Resistance = Work or Obstructions voltage current resistance
RESISTANCE: MEASURED IN OHMS Ω
Voltage => Volts = V Current => Amperes = Amps = A Resistance => Ohms = Ω ELECTRICITY: NOTATION
Voltage = Current * Resistance (V=IR) Resistance = Voltage/Current (R=V/I) Example: Given: Voltage = 10 V Resistance = 1k Ω What is Current? Current = I = V/R = 10/1000 = 1/100 = 0.01 A =10 mAmps OHM’S LAW: V=IR
ELECTRONIC BREADBOARD
Notch = Direction VCC =Power GND = Ground 4 NAND Gates DIP Package A DIGITAL LOGIC CHIP
OR, AND, NOT
AND: ∙ & EXAMPLE: 1 ∙ 0 = 0 ◦ Truth Table
OR: + EXAMPLE: = 1 Clock Alternates – Truth Table
XOR EXAMPLE: 1 XOR 0 = 1 Clock Alternates – XOR Truth Table
ADDITIONAL ELECTRONIC GATES
LED DISPLAY TopBottom Left Top RightTop Left Bottom RightMiddle BottomPeriod
BUILDING DIGITAL COMPONENTS Multiplexor Adder Decoder
MULTIPLEXER - DEMULTIPLEXER Multiplexer Demultiplexer selector
MULTIPLEXER: SELECTS ONE INPUT A B S How is the solution provided mathematically? Out
MULTIPLEXER: SELECTS ONE INPUT A B S Out Out = (A !S) + (B S)
A, B: Input bits S: Sum S = A XOR B C: Carry C = A & B Notice there is no Carry-in HALF ADDER
FULL ADDER
ENCODER - DECODER Encoder Decoder Input Output
DECODER Decoder InputOutput
DECODER: SUMS OF PRODUCT SOLUTION InputOutput
DESIGNING A CIRCUIT 1.Define the Truth Table 2.Write Sum of Products 3.Optimize 4.Develop circuit Example: Parity
PARITY Used in Data Communications, RAID disk systems Even Parity Example: Each Byte sums to even number of 1-bits > > > > ? Odd Parity Example: Each 3 bits sums to odd number of 1-bits 00-> > 0 11-> ? Enables ERROR CHECKING, Sometimes ERROR CORRECTION
STEP 1: PROVIDE TRUTH TABLE EVEN PARITY: OUTPUT ASSURES EVEN 1 DIGITS Input1Input2Input
STEP 2: WRITE SUM OF PRODUCTS
STEP 3: OPTIMIZE LAWS Commutative Law: A+B = B+A AB = BA Associative Law: A+(B+C)=(A+B)+C A(BC) = (AB)C Distributive Law: A(B+C) = AB + AC BOOLEAN ALGEBRA
STEP 4: DEVELOP CIRCUIT … LOGIC CIRCUIT
Green = 01 Yellow = 10 Red = 00 Succession: Green 01 -> Yellow 10 Yellow 10 -> Red 00 Red 00 -> Green 01 TRAFFIC LIGHT
TRAFFIC LIGHT: DESIGN STEP 1: PROVIDE TRUTH TABLE IN0IN1OUT0OUT STEP 2: WRITE SUM OF PRODUCTS
OPTIMIZATION: KARNAUGH MAPS (K-MAPS) AN OPTIMIZATION TECHNIQUE
TRAFFIC LIGHT: DESIGN STEP 1: PROVIDE TRUTH TABLE IN0IN1OUT0OUT STEP 2: DEVELOP K-MAP Out Out
COMPARISON: TRUTH TABLE VS. K-MAP TRUTH TABLE Left columns: Input Right columns: Output KARNAUGH MAP IN0IN1OUT0OUT Out
CD AB SOLVING A K-MAP WITH 4 INPUTS
Input 1 Input 2 Input EVEN PARITY: OUTPUT ASSURES EVEN 1 DIGITS CONVERT TO K-MAP
EVEN PARITY: OUTPUT ASSURES EVEN 1 DIGITS ANALYZE K-MAP
OPTIMIZED PARITY IMPLEMENTATION OPTIMIZED: 6 GATES; ORIGINAL 8 GATES:
CONCLUSION DEFINITIONS Electricity: V = I R Symbols: AND, OR, NOR, XOR, NAND, NOR Equation Form Gate Form Components: Multiplexer, Decoder, Parity, Adder DESIGNING LOGIC 1.Define Truth Table 2.Analyze Write Sum of Products Use Karnaugh Map Optimize in other ways 3.Develop Circuit