Title: Digital Logic
1Digital Logic
- Electricity, Gates, Components
2Digital Logic Reading Appendix
c through C.3
- The Student shall be able to
- Define voltage, current, resistance, volts, amps,
ohms. - Recite ohms 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
3Electricity
Voltage Depth Current Speed Resistance Work
or Obstructions
voltage
current
resistance
4Resistance measured in Ohms ?
5Electricity Notation
- Voltage gt Volts V
- Current gt Amperes Amps A
- Resistance gt Ohms ?
6Ohms Law VIR
- Voltage Current Resistance (VIR)
- Resistance Voltage/Current (RV/I)
- Example
- Given
- Voltage 10 V
- Resistance 1k ?
- What is Current?
- Current I V/R
- 10/1000
- 1/100 0.01 A
- 10 mAmps
7Electronic BreadboarD
8A Digital Logic Chip
- Notch Direction
- VCC Power
- GND Ground
- 4 NAND Gates
- DIP Package
9OR, AND, NOT
10 11AND Example 1 0 0
? Truth Table 0 1
0 0 0
1 0 1
12OR Example 1 0 1
Truth Table 0 1
0 0 1
1 1 1
Clock Alternates 1 - 0
13XORExample 1 XOR 0 1
XOR Truth Table 0 1
0 0 1
1 1 0
Clock Alternates 1 - 0
14Additional Electronic Gates
15LED Display
Top Bottom Left Top Right Top Left Bottom
Right Middle Bottom Period
16Building Digital COmponents
- Multiplexor
- Adder
- Decoder
17Multiplexer - DemultiplexEr
Multiplexer
Demultiplexer
selector
18Multiplexer Selects One Input
A
Out
B
How is the solution provided mathematically?
S
19Multiplexer Selects One Input
A
Out
B
Out (A ? !S) (B ? S)
S
20Half Adder
- A, B Input bits
- S Sum
- S A XOR B
- C Carry
- C A B
- Notice there is no Carry-in
21Full Adder
Inputs Inputs Inputs Outputs Outputs
A B Cin Cout S
0 0 0 0 0
1 0 0 0 1
0 1 0 0 1
1 1 0 1 0
0 0 1 0 1
1 0 1 1 0
0 1 1 1 0
1 1 1 1 1
22Full Adder
23Encoder - Decoder
Encoder
Decoder
Output
Input
24Decoder
Input Input Input Output Output Output Output Output Output Output Output
0 0 0 0 0 0 0 0 0 0 1
0 0 1 0 0 0 0 0 0 1 0
0 1 0 0 0 0 0 0 1 0 0
0 1 1 0 0 0 0 1 0 0 0
1 0 0 0 0 0 1 0 0 0 0
1 0 1 0 0 1 0 0 0 0 0
1 1 0 0 1 0 0 0 0 0 0
1 1 1 1 0 0 0 0 0 0 0
Decoder
25Decoder Sums of Product Solution
Input Input Input Output Output Output Output Output Output Output Output
0 0 0 0 0 0 0 0 0 0 1
0 0 1 0 0 0 0 0 0 1 0
0 1 0 0 0 0 0 0 1 0 0
0 1 1 0 0 0 0 1 0 0 0
1 0 0 0 0 0 1 0 0 0 0
1 0 1 0 0 1 0 0 0 0 0
1 1 0 0 1 0 0 0 0 0 0
1 1 1 1 0 0 0 0 0 0 0
2 1 0 7 6 5
4 3 2 1 0
26Designing A Circuit
- Define the Truth Table
- Write Sum of Products
- Optimize
- Develop circuit
27Parity
- Used in Data Communications, RAID disk systems
- Even Parity Example Each Byte sums to even
number of 1-bits - 0000000 -gt 0
- 1111111 -gt 1
- 0101010 -gt 1
- 1000001-gt ?
- Odd Parity Example Each 3 bits sums to odd
number of 1-bits - 00-gt 1
- 10 -gt 0
- 11-gt ?
- Enables ERROR CHECKING, Sometimes ERROR
CORRECTION
28Step 1 Provide Truth TableEven Parity Output
Assures even 1 digits
Input1 Input2 Input3 Output
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1
29Step 2 Write Sum of Products
30Step 3 optimize
- Commutative Law
- AB BA
- AB BA
- Associative Law
- A(BC)(AB)C
- A(BC) (AB)C
- Distributive Law
- A(BC) AB AC
31Step 4 Develop Circuit Logic Circuit
32Traffic Light
- Green 01
- Yellow 10
- Red 00
- Succession
- Green 01 -gt Yellow 10
- Yellow 10 -gt Red 00
- Red 00 -gt Green 01
33Traffic Light Design
- Step 2
- Write Sum of Products
- Step 1
- Provide Truth Table
IN0 IN1 OUT0 OUT1
0 0 0 1
0 1 1 0
1 0 0 0
34Optimization Karnaugh Maps (K-Maps)
- An Optimization Technique
35Traffic Light Design
- Step 1
- Provide Truth Table
Out0
0 1
0 0
IN0 IN1 OUT0 OUT1
0 0 0 1
0 1 1 0
1 0 0 0
Out1
1 0
0 0
36Comparison Truth Table vs. K-Map
- Left columns Input
- Right columns Output
IN0 IN1 OUT0 OUT1
0 0 0 1
0 1 1 0
1 0 0 0
Out0
0 1
0 0
37Solving a K-map with 4 inputs
CD
0 0 1 1
1 1 1 1
AB 1 1 1 1
0 1 0 0
38Even Parity Output Assures even 1
digitsConvert to K-Map
Input1 Input2 Input3 Output
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1
0 1
1 0
0 1
1 0
39Even Parity Output Assures even 1
digitsAnalyze K-Map
0 1
1 0
0 1
1 0
40Optimized Parity ImplementationOptimized 6
Gates Original 8 Gates
41Conclusion
- Electricity V I R
- Symbols AND, OR, NOR, XOR, NAND, NOR
- Equation Form
- Gate Form
- Components Multiplexer, Decoder, Parity, Adder
- Define Truth Table
- Analyze
- Write Sum of Products
- Use Karnaugh Map
- Optimize in other ways
- Develop Circuit