![Page 1: Lecture 13: Encoders, Multiplexers, Three- State Gates ... · PDF fileLecture 13: Encoders, Multiplexers, Three-State Gates, ... A 4-way Demultiplexer 12 in: ... (inactive), gate as](https://reader031.vdocument.in/reader031/viewer/2022030412/5a9e58667f8b9a7f2e8ba408/html5/thumbnails/1.jpg)
Prof. YingLi TianMar. 29, 2018
Department of Electrical EngineeringThe City College of New York
The City University of New York (CUNY)
Lecture 13: Encoders, Multiplexers, Three-State Gates, and Gate Arrays
1
EE210: Switching Systems
![Page 2: Lecture 13: Encoders, Multiplexers, Three- State Gates ... · PDF fileLecture 13: Encoders, Multiplexers, Three-State Gates, ... A 4-way Demultiplexer 12 in: ... (inactive), gate as](https://reader031.vdocument.in/reader031/viewer/2022030412/5a9e58667f8b9a7f2e8ba408/html5/thumbnails/2.jpg)
Decoders
2
EN1: active highEN2’: active lowEN3’: active lowOutputs: active low
EN’: active lowOutputs: active high
![Page 3: Lecture 13: Encoders, Multiplexers, Three- State Gates ... · PDF fileLecture 13: Encoders, Multiplexers, Three-State Gates, ... A 4-way Demultiplexer 12 in: ... (inactive), gate as](https://reader031.vdocument.in/reader031/viewer/2022030412/5a9e58667f8b9a7f2e8ba408/html5/thumbnails/3.jpg)
Implement Logic Functions using Decoders
Example 5.3 (p263 - 264): Implement the following functions using decoders with OR or NAND gates.f (a, b, c) = ∑m(0, 2, 3, 7)g(a, b, c) = ∑m(1, 4, 6, 7)
3
![Page 4: Lecture 13: Encoders, Multiplexers, Three- State Gates ... · PDF fileLecture 13: Encoders, Multiplexers, Three-State Gates, ... A 4-way Demultiplexer 12 in: ... (inactive), gate as](https://reader031.vdocument.in/reader031/viewer/2022030412/5a9e58667f8b9a7f2e8ba408/html5/thumbnails/4.jpg)
Binary Encoders An encoder is the inverse of a binary
decoder. A binary encoder is a multi-input combinational logic circuit that converts the logic level "1" data at its inputs into an equivalent binary code at its output. An "n-bit" binary encoder has 2n input lines and n-bit output lines with common types that include 4-to-2, 8-to-3 and 16-to-4 line configurations.
4
![Page 5: Lecture 13: Encoders, Multiplexers, Three- State Gates ... · PDF fileLecture 13: Encoders, Multiplexers, Three-State Gates, ... A 4-way Demultiplexer 12 in: ... (inactive), gate as](https://reader031.vdocument.in/reader031/viewer/2022030412/5a9e58667f8b9a7f2e8ba408/html5/thumbnails/5.jpg)
A 4-to-2 Binary Encoder
5Figure is from http://www.electronics tutorials.ws/combination/comb_4.html
![Page 6: Lecture 13: Encoders, Multiplexers, Three- State Gates ... · PDF fileLecture 13: Encoders, Multiplexers, Three-State Gates, ... A 4-way Demultiplexer 12 in: ... (inactive), gate as](https://reader031.vdocument.in/reader031/viewer/2022030412/5a9e58667f8b9a7f2e8ba408/html5/thumbnails/6.jpg)
Priority Encoders If more than one input can be 1 at the same
time, priority must be established: Descending: Highest priority given to the
largest input number. Ascending: Highest priority given to the
smallest input number.
6
![Page 7: Lecture 13: Encoders, Multiplexers, Three- State Gates ... · PDF fileLecture 13: Encoders, Multiplexers, Three-State Gates, ... A 4-way Demultiplexer 12 in: ... (inactive), gate as](https://reader031.vdocument.in/reader031/viewer/2022030412/5a9e58667f8b9a7f2e8ba408/html5/thumbnails/7.jpg)
Example of a Priority Encoder
Highest priority given to the largest input number (Descending). NR indicates that there are no requests.
![Page 8: Lecture 13: Encoders, Multiplexers, Three- State Gates ... · PDF fileLecture 13: Encoders, Multiplexers, Three-State Gates, ... A 4-way Demultiplexer 12 in: ... (inactive), gate as](https://reader031.vdocument.in/reader031/viewer/2022030412/5a9e58667f8b9a7f2e8ba408/html5/thumbnails/8.jpg)
Multiplexers (muxes) A multiplexer (mux) is a device that selects one of several
analog or digital input signals and forwards the selected input into a single line. A multiplexer of 2n inputs has nselect lines, which are used to select which input line to send to the output.
8
A 2-to-1 MultiplexerSelect line
S = 0, out = w;S = 1, out = x.
![Page 9: Lecture 13: Encoders, Multiplexers, Three- State Gates ... · PDF fileLecture 13: Encoders, Multiplexers, Three-State Gates, ... A 4-way Demultiplexer 12 in: ... (inactive), gate as](https://reader031.vdocument.in/reader031/viewer/2022030412/5a9e58667f8b9a7f2e8ba408/html5/thumbnails/9.jpg)
A 4-to-1 Multiplexer
9
Select lines
(S1, S0) = 00, out = w;(S1, S0) = 01, out = x;(S1, S0) = 10, out = y;(S1, S0) = 11, out = z.
![Page 10: Lecture 13: Encoders, Multiplexers, Three- State Gates ... · PDF fileLecture 13: Encoders, Multiplexers, Three-State Gates, ... A 4-way Demultiplexer 12 in: ... (inactive), gate as](https://reader031.vdocument.in/reader031/viewer/2022030412/5a9e58667f8b9a7f2e8ba408/html5/thumbnails/10.jpg)
Implement Logic Functions using Multiplexer
10
f (a, b, c) = ∑m(0, 1, 2, 5)
Implement f with:1. an 8-way mux.2. a 4-way mux.
![Page 11: Lecture 13: Encoders, Multiplexers, Three- State Gates ... · PDF fileLecture 13: Encoders, Multiplexers, Three-State Gates, ... A 4-way Demultiplexer 12 in: ... (inactive), gate as](https://reader031.vdocument.in/reader031/viewer/2022030412/5a9e58667f8b9a7f2e8ba408/html5/thumbnails/11.jpg)
Demultiplexers A demultiplexer is a device that selects one of several
analog or digital output signals from a single input line.
11http://en.wikipedia.org/wiki/Multiplexer
A 1-to-2 DeMultiplexer
![Page 12: Lecture 13: Encoders, Multiplexers, Three- State Gates ... · PDF fileLecture 13: Encoders, Multiplexers, Three-State Gates, ... A 4-way Demultiplexer 12 in: ... (inactive), gate as](https://reader031.vdocument.in/reader031/viewer/2022030412/5a9e58667f8b9a7f2e8ba408/html5/thumbnails/12.jpg)
A 4-way Demultiplexer
12
in: input signal a, b are the selectsab = 00, out0 = in. ab = 01, out1 = in. ab = 10, out2 = in. ab = 11, out3 = in.
![Page 13: Lecture 13: Encoders, Multiplexers, Three- State Gates ... · PDF fileLecture 13: Encoders, Multiplexers, Three-State Gates, ... A 4-way Demultiplexer 12 in: ... (inactive), gate as](https://reader031.vdocument.in/reader031/viewer/2022030412/5a9e58667f8b9a7f2e8ba408/html5/thumbnails/13.jpg)
Three-State Gates Input variables:
1 0 X (don’t care,
can be 0 or 1)
Outputs 1 0 Z (not
connected) 3rd
state.13
EN: Enable input. EN = 1 (active), gate as usual. EN = 0 (inactive), gate as an open-circuit (not connected – the 3rd
state).
![Page 14: Lecture 13: Encoders, Multiplexers, Three- State Gates ... · PDF fileLecture 13: Encoders, Multiplexers, Three-State Gates, ... A 4-way Demultiplexer 12 in: ... (inactive), gate as](https://reader031.vdocument.in/reader031/viewer/2022030412/5a9e58667f8b9a7f2e8ba408/html5/thumbnails/14.jpg)
Three-State Gates The 3rd state “Z” is the state of an output
terminal which is not currently driven by the circuit. It means that the signal is neither driven to a logical high nor low level - hence "tri-stated". Such a signal can be seen as an open circuit because connecting it to a low impedance circuit will not affect that circuit; it will instead itself be pulled to the same voltage as the actively driven output.
14
![Page 15: Lecture 13: Encoders, Multiplexers, Three- State Gates ... · PDF fileLecture 13: Encoders, Multiplexers, Three-State Gates, ... A 4-way Demultiplexer 12 in: ... (inactive), gate as](https://reader031.vdocument.in/reader031/viewer/2022030412/5a9e58667f8b9a7f2e8ba408/html5/thumbnails/15.jpg)
A 2-way Multiplxer using 3-state gates
15
EN: Enable input. EN = 0, f = a. EN = 1, f = b.
![Page 16: Lecture 13: Encoders, Multiplexers, Three- State Gates ... · PDF fileLecture 13: Encoders, Multiplexers, Three-State Gates, ... A 4-way Demultiplexer 12 in: ... (inactive), gate as](https://reader031.vdocument.in/reader031/viewer/2022030412/5a9e58667f8b9a7f2e8ba408/html5/thumbnails/16.jpg)
Gate Arrays-- Programmable Logic Device (PLD) Gate arrays are an approach to the design
and manufacture of application-specific integrated circuits by using standard NAND or NOR logic gates, and other active devices. ROMs – Read-Only Memories PLAs – Programmable Logic Arrays PALs –Programmable Array Logic
16
![Page 17: Lecture 13: Encoders, Multiplexers, Three- State Gates ... · PDF fileLecture 13: Encoders, Multiplexers, Three-State Gates, ... A 4-way Demultiplexer 12 in: ... (inactive), gate as](https://reader031.vdocument.in/reader031/viewer/2022030412/5a9e58667f8b9a7f2e8ba408/html5/thumbnails/17.jpg)
A Gate Array
17
A gate array with 3 inputs and 3 outputs.
Dash lines indicate possible connections.
One big company for Field-programmable gate array (FPGA) is “xilink”, http://www.xilinx.com/
More info about FPGA can be found at:http://en.wikipedia.org/wiki/Field-programmable_gate_array
![Page 18: Lecture 13: Encoders, Multiplexers, Three- State Gates ... · PDF fileLecture 13: Encoders, Multiplexers, Three-State Gates, ... A 4-way Demultiplexer 12 in: ... (inactive), gate as](https://reader031.vdocument.in/reader031/viewer/2022030412/5a9e58667f8b9a7f2e8ba408/html5/thumbnails/18.jpg)
18
Implementation of the following functions:
f = a’b’ + abcg = a’b’c’ + ab + bch = a’b’ + c
Solid lines indicate the actual connections.
![Page 19: Lecture 13: Encoders, Multiplexers, Three- State Gates ... · PDF fileLecture 13: Encoders, Multiplexers, Three-State Gates, ... A 4-way Demultiplexer 12 in: ... (inactive), gate as](https://reader031.vdocument.in/reader031/viewer/2022030412/5a9e58667f8b9a7f2e8ba408/html5/thumbnails/19.jpg)
Simple Representation
19
Use dots or Xs show the actual connections. Implementation of the following functions:
f = a’b’ + abcg = a’b’c’ + ab + bch = a’b’ + c
![Page 20: Lecture 13: Encoders, Multiplexers, Three- State Gates ... · PDF fileLecture 13: Encoders, Multiplexers, Three-State Gates, ... A 4-way Demultiplexer 12 in: ... (inactive), gate as](https://reader031.vdocument.in/reader031/viewer/2022030412/5a9e58667f8b9a7f2e8ba408/html5/thumbnails/20.jpg)
Three Common Types of Logic Arrays ROMs – Read-Only Memories: user can
specify the connections of only the OR gates.
PLAs (Programmable Logic Arrays): user can specify the connections of both AND and OR gates.
PALs –Programmable Array Logic: user can specify the connections of the AND gates.
20
![Page 21: Lecture 13: Encoders, Multiplexers, Three- State Gates ... · PDF fileLecture 13: Encoders, Multiplexers, Three-State Gates, ... A 4-way Demultiplexer 12 in: ... (inactive), gate as](https://reader031.vdocument.in/reader031/viewer/2022030412/5a9e58667f8b9a7f2e8ba408/html5/thumbnails/21.jpg)
Designing with ROMs
21
W(A, B, C, D) = ∑m(3, 7, 8, 9, 11, 15)
X(A, B, C, D) = ∑m(3, 4, 5, 7, 10, 14, 15)
Y(A, B, C, D) = ∑m(1, 5, 7, 11, 15)
For ROMs – user can specify the connections of only the OR gates.
Xs show the connections built into the ROM, dots show the implementation.
![Page 22: Lecture 13: Encoders, Multiplexers, Three- State Gates ... · PDF fileLecture 13: Encoders, Multiplexers, Three-State Gates, ... A 4-way Demultiplexer 12 in: ... (inactive), gate as](https://reader031.vdocument.in/reader031/viewer/2022030412/5a9e58667f8b9a7f2e8ba408/html5/thumbnails/22.jpg)
Designing with PLAs -- 1
22
W(A, B, C, D) = ∑m(3, 7, 8, 9, 11, 15)
X(A, B, C, D) = ∑m(3, 4, 5, 7, 10, 14, 15)
Y(A, B, C, D) = ∑m(1, 5, 7, 11, 15)
For PLAs – user can specify the connections of both the AND and OR gates.
Step1: Draw K-maps
Step2: Find SOPs (need to find the shared terms)
Step3: Implementation
![Page 23: Lecture 13: Encoders, Multiplexers, Three- State Gates ... · PDF fileLecture 13: Encoders, Multiplexers, Three-State Gates, ... A 4-way Demultiplexer 12 in: ... (inactive), gate as](https://reader031.vdocument.in/reader031/viewer/2022030412/5a9e58667f8b9a7f2e8ba408/html5/thumbnails/23.jpg)
Designing with PLAs -- 2
23
W(A, B, C, D) = ∑m(3, 7, 8, 9, 11, 15) = AB´C´ + CD
X(A, B, C, D) = ∑m(3, 4, 5, 7, 10, 14, 15) = A´BC´ + ACD´ + A´CD + {BCD or ABC)
Y(A, B, C, D) = ∑m(1, 5, 7, 11, 15) = A´C´D + ACD + {A´BD or BCD}
![Page 24: Lecture 13: Encoders, Multiplexers, Three- State Gates ... · PDF fileLecture 13: Encoders, Multiplexers, Three-State Gates, ... A 4-way Demultiplexer 12 in: ... (inactive), gate as](https://reader031.vdocument.in/reader031/viewer/2022030412/5a9e58667f8b9a7f2e8ba408/html5/thumbnails/24.jpg)
Designing with PLAs -- 3
24
Solution 2: W = AB´C´ + A´CD + ACD
X = A´BC´ + ACD´ + A´CD + BCD
Y = A´C´D + ACD + BCD
![Page 25: Lecture 13: Encoders, Multiplexers, Three- State Gates ... · PDF fileLecture 13: Encoders, Multiplexers, Three-State Gates, ... A 4-way Demultiplexer 12 in: ... (inactive), gate as](https://reader031.vdocument.in/reader031/viewer/2022030412/5a9e58667f8b9a7f2e8ba408/html5/thumbnails/25.jpg)
Designing with PLAs -- 4
25
Solution 2: W = AB´C´ + A´CD + ACD
X = A´BC´ + ACD´ + A´CD + BCD
Y = A´C´D + ACD + BCD
Solution 1: W = AB´C´ + CD
X = A´BC´ + ACD´ + A´CD + {BCD or ABC)
Y = A´C´D + ACD + {A´BD or BCD}
Solution 1 Solution 2
![Page 26: Lecture 13: Encoders, Multiplexers, Three- State Gates ... · PDF fileLecture 13: Encoders, Multiplexers, Three-State Gates, ... A 4-way Demultiplexer 12 in: ... (inactive), gate as](https://reader031.vdocument.in/reader031/viewer/2022030412/5a9e58667f8b9a7f2e8ba408/html5/thumbnails/26.jpg)
Designing with PALs
26
For PAL (Programmable Array Logic): user can specify the connections of the AND gates.
A PAL with 6 inputs and 4 outputs.
![Page 27: Lecture 13: Encoders, Multiplexers, Three- State Gates ... · PDF fileLecture 13: Encoders, Multiplexers, Three-State Gates, ... A 4-way Demultiplexer 12 in: ... (inactive), gate as](https://reader031.vdocument.in/reader031/viewer/2022030412/5a9e58667f8b9a7f2e8ba408/html5/thumbnails/27.jpg)
Designing with PALs
27
W = AB´C´ + CD
X = A´BC´ + ACD´ + A´CD + {BCD or ABC)
Y = A´C´D + ACD + {A´BD or BCD}
![Page 28: Lecture 13: Encoders, Multiplexers, Three- State Gates ... · PDF fileLecture 13: Encoders, Multiplexers, Three-State Gates, ... A 4-way Demultiplexer 12 in: ... (inactive), gate as](https://reader031.vdocument.in/reader031/viewer/2022030412/5a9e58667f8b9a7f2e8ba408/html5/thumbnails/28.jpg)
Announcement Read Chapter 5.3, 5.4, 5.5, 5.6 HW5 is out today, due 4/10/2018! Next class:
Sequential System Design State Tables, Diagrams
28