1
1
Digital Circuits II
Review of Digital Circuits and Systems
References: Text Book: Digital Logics: A Practical Approach with VHDL,
9th Edition, by William Kleitz, published by Pearson.
Ch 1. Number Systems and Codes
Ch 2. Digital Electronic Signals and Switched
Ch 3. Basic Logic Gates
Ch 5. Boolean Algebra and Reduction Techniques
Ch 6. Ex-OR and Ex-NOR Gates
Ch 8. Code Converters, Multiplexers, and Demultiplexer
Paul I-Hai Lin, Professor
Dept. of Computer, Electrical and Information Technology
Indiana University-Purdue University Fort Wayne
Prof. Paul Lin
2
Outline
1. Digital Logic Families, voltage Levels: TTL, CMOS
(Complementary Metal Oxide Semiconductor), Emitter-
coupled logic (ECL)
2. Number systems
3. Basic logic gate (NOT, AND, OR, NAND, NOR, EX-OR,
EX-NOR), truth tables
4. Combinational logic, Boolean algebra
5. Code converters, multiplexers and de-multiplexers
Prof. Paul Lin
2
3
Characteristics of TTL, CMOS, and ECL
Logic Circuits Dissipated power
Fan-in (max number of inputs to a gate)
Fan-out (max number of standard loads)
Voltage transfer curve, Threshold voltage
Propagation delay time
Rise and fall times
Noise immunity
Voltage levels (logic 0/Logic 1)
Input impedance
Prof. Paul Lin
4
Examples of Binary Logic Levels
Prof. Paul Lin
Technology L voltage H voltage Notes
CMOS 0 V to 1/3 VDD 2/3 VDD to VDD
VDD =
Supply voltage
TTL 0 V to 0.8 V 2 V to VCC
VCC = 5 V
±10%
ECL VEE to −1.4 V −1.2 V to 0 V
VEE is
about −5.2 V;
VCC=Ground
3
5
Number Systems
Binary: 0, 1
Octal: 0, 1, 2, 3, 4, 5, 6, 7
Decimal: 0, 1, 2, …9
Hexadecimal: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
Prof. Paul Lin
6
Number Systems
Prof. Paul Lin
Decimal Binary Octal Hexa-
decimal
Decimal Binary Octal Hexa-
decimal
0 0000 0 (000) 0 8 1000 10
(001 000)
8
1 0001 1 (001) 1 9 1001 11
(001 001)
9
2 0010 2 (010) 2 10 1010 12
(001 010)
A
3 0011 3 (011) 3 11 1011 13
(001 011)
B
4 0100 4 (100) 4 12 1100 14
(001 100)
C
5 0101 5 (101) 5 13 1101 15
(001 101)
D
6 0110 6 (110) 6 14 1110 16
(001 110)
E
7 0111 7 (111) 7 15 1111 17
(001 111)
F
4
7
Logic Gates and Shift Registers
NOT, AND, OR, NOR, NAND, EX-OR, EX-NOR
Prof. Paul Lin
AND OR
EX-OR
Shift
Left
1 0 1 0 1 1 1 1 1 1 1 1 0 1 Shift
Right0
1 0 1 0 1 1 1 1 1 1 1 1 1 0 0
8
Example: The truth table for the Two-Input
AND, OR, and EXOR Gates Two inputs: A, B; One output: X
Prof. Paul Lin
AND
OR
EX-OR
A B X=A∙B Y=A+B Z= A B
A&B A|B A ^ B
0 0 0 0 0
0 1 0 1 1
1 0 0 1 1
1 1 1 1 0
5
9
Example: Software implementation of two
input AND, OR, and EXOR gates using 8-bit
data word
Prof. Paul Lin
bit0
bit1
bit2
bit3
bit4
bit5
bit6
bit7
b0
c0
b1
c1
b2
c2
b3
c3
b4
c4
b5
c5
b6
c6
b7
c7
bit0
bit1
bit2
bit3
bit4
bit5
bit6
bit7
b0
c0
b1
c1
b2
c2
b3
c3
b4
c4
b5
c5
b6
c6
b7
c7
bit0
bit1
bit2
bit3
bit4
bit5
bit6
bit7
b0
c0
b1
c1
b2
c2
b3
c3
b4
c4
b5
c5
b6
c6
b7
c7
10
Examples of TTL IC Chips
7400 (Quad 2-input NAND Gates)
7402 (Quad 2-input NOR Gates)
7404 (Hex Inverters)
7408 (Quad 2-input AND Gates)
7432 (Quad 2-input OR Gates)
7486 ((Quad 2-input EXOR Gates
74126 ((Quad Tri-state buffers)
74266 (Quad ExNOR Gates with open collector outputs)
Prof. Paul Lin
6
11
Combinational Logics [15][16]
A type of digital logic which is implemented by Boolean circuits,
where the output is a pure function of the present input only.
Examples
• Arithmetic & Logic Functions: adders, substractors, comparators,
PLDs (programmable logic devices)
• Code coders: binary, BCD (Binary Coded Decimal), 7-segments,
gray code to binary
• Data transmission: multiplexers, demultiplexers, encoders and
decoders
Prof. Paul Lin
CombinationalLogic Circuit
MultipleInputs
A
B
C
X
Y
Output
Output = f(Inputs)
12
Three Main Methods of Specifying the
Function of a Combinational Logic
(a) Boolean algebra, (b) Truth table, (c ) Logic diagram
Boolean Algebra [17][18][19]
• Boolean algebra was introduced by George Boole in his book
entitled “The Mathematic Analysis of Logic (1847).
• The subarea of algebra in which the values of the variables are
the truth values and false, usually denoted 1 and 0 respectively.
• Main operations of Boolean algebra are the conjunction (AND),
disjunction (OR), and the negation (NOT).
• A formalism for describing logic relations in the same way that
ordinary algebra describe numeric relations.
• Boolean algebra has been fundamental in the development of
digital electronics, and is provided for in all modern programming
languages.
Prof. Paul Lin
7
13
Example: Logic Diagram, write a set of Boolean
equations for the following multiple inputs, multiple
outputs logic circuit.
Prof. Paul Lin
D
E
A B C
F
14
Example: Implementation of a four variable Boolean function
which is expressed in the SOP (Sum of Product) form:
F_out = B’D’ + B’C’ + A’D
Prof. Paul Lin
F_out =
B’D’ + B’C’ + A’D
AND-1
OR
AND-3
AND-2
A
A’
B C D
Four Input Bits
B’ C’ D’
B’D’
B’C’
A’D
8
15
Example: Implementation of a four variable Boolean function
which is expressed in the SOP (Sum of Product) form:
F_out = B’D’ + B’C’ + A’D
Prof. Paul Lin
The Truth Table
A B C D | F
---------------|-----
0 0 0 0 | 1
0 0 0 1 | 1
0 0 1 0 | 1
0 0 1 1 | 1
0 1 0 0 | 0
0 1 0 1 | 1
1 0 0 0 | 1
0 1 1 0 | 0
0 1 1 1 | 0
The Truth Table
A B C D | F
---------------|-----
1 0 0 1 | 1
1 0 1 0 | 1
1 0 1 1 | 1
1 1 0 0 | 0
1 1 0 1 | 0
1 1 1 0 | 0
1 1 1 1 | 0
16
Code Converters
BCD (Binary Coded Decimal)
• 7442 BCD to Decimal Decorder
• 7445 BCD to Decimal Decoder/Driver (4 inputs, 10 outputs)
• 74145 BCD-toDecimal
• CD 4028 BCD to Decimal decoder (DIP-16)
• 74147 (1o-line decimal to 4-line BCD priority encoders)
Octal to Decimal Encoder
• 8-line to 3-line octal priority encoders, 74148
Gray Code
7 segment display code
• 7447 BCD to Seven Segment display (Open collector)
Prof. Paul Lin
9
17
Decimal Digit – BCD Code
Prof. Paul Lin
Decimal
Digit
0 1 2 3 4 5 6 7 8 9
BCD
Code
0000 0001 0010 0011 0100 0101 0110 0111 1000 1001
18
Binary to Gray Code
Prof. Paul Lin
Decimal Binary Gray Decimal Binary Gray
0 0000 0000 8 1000 1100
1 0001 0001 9 1001 1101
2 0100 0011 10 1010 1111
3 0011 0010 11 1011 1110
4 0100 0110 12 1100 1010
5 0101 0111 13 1101 1011
6 0110 0101 14 1110 1001
7 0111 0100 15 1111 1000
10
19
Multiplexers (Data Selector) [22]
2-to-4 Selector/Multiplexer, two selection lines (74LS139, Dual 2-to-
4 line decoders/multiplexer)
3-to-8 Selector/Multiplexer, 3 address section lines (74LS138)
Prof. Paul Lin
IC Name Function/Output
74157 Quad 2:1 Mux, Output is the same as the
input
74158 Quad 2:1 Mux, Output is inverted
74153 Dual 4:1 Mux, Output is the same as the
input
74352 Dual 4:1 Mux, Output is inverted
74151 8:1 Mux
74150 16:1 Mux, Output is inverted
20
De-Multiplexers/Decocoders
Dual 2-to-4 Line decoder, 74155
4-Line to 16-Line Decoders/Demultiplexers, 74154
Prof. Paul Lin
IC Name Function/Output
74139 Dual 1:4 Demux, Output is inverted, 2-to-4 line
74156 Dual 1:4 Demux, Output is open collector
74138 1:8 Demux, Output is inverted
74238 1:8 Demux
74154 1:16 Demux, Inverted output
74159/CD
4514/15
1:16 Demux, Output is open collector
11
21
Interfaces to the Digital Circuits
Example: Interface to SPST switch and push button switch using debouncing circuit.
Prof. Paul Lin
SPST
switch
+5V
Vout7414
Schmitt
Trigger
R = 33k
Input 0
+5V
C = 5µF
22
Interfaces to the Digital Circuits
Example: Interface to Micro switch.
Prof. Paul Lin
NC NOC
NC – Normally OpenNO – Normally CloseC - Common
+5V
10K
+5V
7404 Hex Inverter
NC NO
C
Digital Multimeter
+
-
Vi= 1.6v
Vo = 0v
Switch OFF
1 2 7
14
Digital Multimeter
+
-
+5V
10K
+5V
7404 Hex Inverter
NC NO
C
Digital Multimeter
+
-
Vi= 5v
Vo = 0v
Switch ON
1 2 7
14
Digital Multimeter
+
-
12
23
Interfaces to the Digital Circuits
Example: Interface to On/Off switch.
Prof. Paul Lin
+5V
10K
+5V
7404 Hex Inverter
NC
NO
C
Digital Multimeter
+
-
Vi=0v
Vo =3.8v
Switch OFF
1 2 7
14
+5V
+5V
10K
7404 Hex Inverter
NC
NO
C
Digital Multimeter
+
-
Vi=5v
Vo = 0v
Switch ON
1 2 7
14
24
Interfaces to the Digital Circuits
Example: Interface to Microcontroller using 7404 inverter.
Example: Interface to Control system.
Prof. Paul Lin
Switch
R = 33k
Input 0
+5V
C = 5µF
Microcontroller
Switch
R = 33k
Input 0
+5V
C = 5µF
Computer
Control System
13
References1. Logic Gate, http://en.wikipedia.org/wiki/Logic_gate
2. Basic Logic Gates and Functions, http://www.ee.surrey.ac.uk/Projects/CAL/digital-
logic/gatesfunc/index.html
3. An Introduction to Digital Logic – Signals and Gates,
http://www.facstaff.bucknell.edu/mastascu/elessonshtml/Logic/Logic1.html
4. Digital Logic, Skarkfun, https://learn.sparkfun.com/tutorials/digital-logic
5. Chapter 3 Logic Gates, Lessons in Electric Circuits – Vol. IV,
http://www.ibiblio.org/kuphaldt/electricCircuits/Digital/DIGI_3.html
6. Logic Gates Test, Circuit Lab, https://www.circuitlab.com/circuit/gwjr96/logic-gates-
test/
7. Logic Level, http://en.wikipedia.org/wiki/Logic_level
8. What are the Basic Difference Between CMOS and TTL Signals,
http://digital.ni.com/public.nsf/allkb/2D038D3AE1C35011862565A8005C5C63
9. Experiment 3: TTL and CMOS Characteristics,
http://www.lns.cornell.edu/~ib38/teaching/p360/lectures/wk09/l26/EE2301Exp3F10.pd
f
10. 5V TTL and CMOS Input and Output Voltage Levels, Intro to Mechtronics,
http://engr.sjsu.edu/~bjfurman/courses/ME106/ME106pdf/TTL-CMOS_logic-levels.pdf
11. 3.3 C CMOS Logic Levels, https://learn.sparkfun.com/tutorials/logic-levels/33-v-cmos-
logic-levels
Prof. Paul Lin 25
References12.Voltage Level Translation between 3.3V, 2.5V, 1.8V and 1.5V Logic
Standards, http://www.ti.com/lit/an/scea030a/scea030a.pdf
13.CD4504B - Hex voltage-level shifter for TTL-to-CMOS or CMOS-to-CMOS, http://www.ti.com/product/cd4504b
14.MC14504B – Hex Level Shifter for TTL to COMS or CMOS to CMOS, http://www.onsemi.com/pub_link/Collateral/MC14504B-D.PDF
15.Combinational Logic, http://en.wikipedia.org/wiki/Combinational_logic
16.Combinational Logic Circuits, Electronics Tutorial, http://www.electronics-tutorials.ws/combination/comb_1.html
17.Boolean Algebra, http://en.wikipedia.org/wiki/Boolean_algebra
18.Boolean Algebra, http://www.ee.surrey.ac.uk/Projects/Labview/boolalgebra/index.html
19.Boolean Algebra, Wolfram Mathworld, http://mathworld.wolfram.com/BooleanAlgebra.html
20.Boolean Arithmetics, http://www.allaboutcircuits.com/vol_4/chpt_7/2.html
21.Introduction to Boolean Logic, http://www.i-programmer.info/babbages-bag/235-logic-logic-everything-is-logic.html
22.Multiplexer, http://en.wikipedia.org/wiki/Multiplexer
Prof. Paul Lin 26
14
Summary & Conclusion
Prof. Paul Lin 27