Date post: | 04-Jun-2018 |
Category: |
Documents |
Upload: | ernest-tiong |
View: | 216 times |
Download: | 0 times |
of 16
8/13/2019 13chap6(1)Encoder
1/16
Modern DigitalModern Digital ElectronicsElectronics
Lectureter : Xie Songyun
8/13/2019 13chap6(1)Encoder
2/16
8/13/2019 13chap6(1)Encoder
3/16
Chapter6:Combinational Logic Design Using MSI Circuits
combinational logic circuits sequential logic circuits function table full adder decoder encoder multiplexer demultiplexer Digital Comparator parity Generator/Checker middle scaled integrated circuits (MSI) common encoder priority encoder8-3 Octal-to-Binary encoder- decimal-to- BCD encoder active-high active-low
extend end complement code
Glossary
8/13/2019 13chap6(1)Encoder
4/16
Chapter6:Combinational Logic Design Using MSI Circuits
6.1 IntroductionUsing the methods of combinational circuit designUsing the methods of combinational circuit design
which have been discussed in Chapter 5, complexwhich have been discussed in Chapter 5, complex
functions have been integrated (MSI) and are easilyfunctions have been integrated (MSI) and are easilyavailable in IC form. There is an attractive array ofavailable in IC form. There is an attractive array of
devices such asdevices such as encoders, decoders, adders,
multiplexers, demultiplexers, Parity generators/checkers,
comparators, etc.
Advantages:
Reduce IC package count thereby reducing the system cost.
The system design is greatly simplified because the laborious and
time consuming simplification methods are generally not required.
Improve the reliability of the system by reducing the number of
external wired connections.
Requirement Familiar with the function performed, the
options available, and the limitations of
these devices.
Make an effective and optimum use of MSI
to design a more complex digital circuits .
Requirement Familiar with the function performed, the
options available, and the limitations of
these devices.
Make an effective and optimum use of MSI
to design a more complex digital circuits .
8/13/2019 13chap6(1)Encoder
5/16
What is encode? The process of using textdigits or
symbols to represent the special object is called encode.
EX: the number of athlete XXXX represents an athlete.One-bit decimal 0~9, altogether 10 codes.
Two-bit decimal 00~99, altogether 100 codes.
Three-bit decimal 000~999, altogether 1000 codes. In the digital system: for 2n general information,there are n-bit binary number of codes.
What is encoder
A circuit which can perform the function of encoding
The logic symbol of encoder: X: general information
Ycodes
6.2 Encoder and Priority Encoders
8/13/2019 13chap6(1)Encoder
6/16
Two types of encoders: common encoderpriority encoder.
In a common encoder, only one encode signal is allowed at any time,it is not allowed to input many encode signals simultaneously.
(1)The Truth table
Octal-to
-Binary
Enc
oder
0I
1I
7I
0Y
1Y
2Yinput output
I0 I1 I2 I3 I4 I5 I6 I7 Y2 Y1 Y0
1 0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0 1
0 0 1 0 0 0 0 0 0 1 0
0 0 0 1 0 0 0 0 0 1 1
0 0 0 0 1 0 0 0 1 0 0
0 0 0 0 0 1 0 0 1 0 1
0 0 0 0 0 0 1 0 1 1 0
0 0 0 0 0 0 0 1 1 1 1
Octal-to-binary encoder,the input is 8 signals I0-I7(active-high), and the
output is 3 bit binary code
Y2Y1Y0 (active-high).
Ex1: How to design a Octal-to-binary encoder
6.2.1 Common Encoder
8/13/2019 13chap6(1)Encoder
7/16
(2) Obtain the logic expression.
input output
I0 I1 I2 I3 I4 I5 I6 I7 Y2 Y1 Y0
1 0 0 0 0 0 0 0 0 0 00 1 0 0 0 0 0 0 0 0 1
0 0 1 0 0 0 0 0 0 1 0
0 0 0 1 0 0 0 0 0 1 1
0 0 0 0 1 0 0 0 1 0 00 0 0 0 0 1 0 0 1 0 1
0 0 0 0 0 0 1 0 1 1 0
0 0 0 0 0 0 0 1 1 1 1
76542 IIIIY
76321 IIIIY
75310 IIIIY
Realize the encoding circuit with 3 ORgates according to the output expression.
1
1
1
Y2
Y1
Y0
I7I6I5I4I3I2I1
6.2.1 Common Encoder
8/13/2019 13chap6(1)Encoder
8/16
input output
I0 I1 I2 I3 I4 I
5
I6 I7 Y2
Y1
Y0
1 0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0 1
0 0 1 0 0 0 0 0 0 1 0
0 0 0 1 0 0 0 0 0 1 1
0 0 0 0 1 0 0 0 1 0 0
0 0 0 0 0 1 0 0 1 0 1
0 0 0 0 0 0 1 0 1 1 0
0 0 0 0 0 0 0 1 1 1 1
76542 IIIIY
Since the input signals repel
each other, so 0II mn
I nI m encoded objectUnencoded object
II
IIIIIIIII
IIIIIIIIIIIIIIII
I
44
765321044
765321044
76532104
Take out one term to analyze:IIIIIIIIIIIIIIII
IIIIIIIIY
65432107
76432105
765321042
so
thus76321 IIIIY
75310 IIIIY
How to simplified the logic expression.6.2.1 Common Encoder
8/13/2019 13chap6(1)Encoder
9/16
I0 I1 I2 I3 I4 I5 I6 I7 I8 I9
0 0 0 00 0 0 1
0 0 1 0
0 0 1 1
0 1 0 0
0 1 0 10 1 1 0
0 1 1 1
1 0 0 0
1 0 0 1
A3A2A1A0
One of the most commonly used input device for a digital system isa set of ten switches, one for each numeral between 0 and 9.
1 0 0 0 0 0 0 0 0 00 1 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0
0 0 0 0 0 1 0 0 0 00 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 1
inputs outputsfeature:
Only one channel is allowed to input 1,
the others input 0 at any time.
The output is encode to the input 1
0000 represents encode to I0.
0001represents encode to I1.
1001 represents encode to I9.
A3=I8+I9A2=I4+I5+I6+I7
A1=I2+I3+I6+I7A0=I1+I3+I5+I7+I9
8I 9I I4~I7I2I3I6I7 I1I3I5I7I9
EX2: Design a decimal-to-BCD Encoder
A3 A2 A1 A0
6.2.1 Common Encoder
8/13/2019 13chap6(1)Encoder
10/16
8/13/2019 13chap6(1)Encoder
11/16
0)( STSif All the gate circuits open
STIIIIY )( 76542
STIIIIIIIIY )( 765435421
STIIIIIIIIIIY )( 76564354210
To extend the circuit function and
increase the flexibility of usage, MSI circuit74LS148, the control circuit is composed of
gates G1G2 and G3.
)(STS select input ends
1)( STS
The encoder works in
normal state.
All the output ends are
locked at high level.
0)( STS&
&
&
&
&
I1
I2
I0
I3
I4
I5
I6
I7
S
YS
YEX
Y0
Y1
Y2
1
1
1
1
1 1
1
1 1
1 1
1 1
1
1(ST)
G1
G2
G3
0 1
0)( STS
1. Octal-to-Binary priority encoder(MSI)74LS148
8/13/2019 13chap6(1)Encoder
12/16
STIIIIIIIIYS 76543210The expression shows: if the encode input
ends are all high level, and when
ST=1(/ST=0)
YS=0.
STSTIIIIIIIIYEX 76543210
STIIIIIIII )( 76543210
It shows: when there is only one low
level(/I7=0, I7=1) at input end and
ST=1
The function table can list out:
0YEX
.SY is select output end
endextendisYEX
Ys=0 represents the circuit works
without code input.
It means when the circuit works code also
inputs.
&
&
&
&
&
I1
I2
I0
I3
I4
I5
I6
I7
S
YS
YEX
Y0
Y1
Y2
1
1
1
1
1 1
1
1 1
1 1
1 1
1
1(ST)
G1
G2
G31
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
1
1
11
0
1
0
1
1
0
0
0
0
6.2.2 Priority Encoder
8/13/2019 13chap6(1)Encoder
13/16
Ys
1 X X X X X X X X 1 1 1 1 1
0 1 1 1 1 1 1 1 1 1 1 1 1 0
0 X X X X X X X 0 0 0 0 0 1
0 X X X X X X 0 1 0 0 1 0 1
0 X X X X X 0 1 1 0 1 0 0 1
0 X X X X 0 1 1 1 0 1 1 0 1
0 X X X 0 1 1 1 1 1 0 0 0 1
0 X X 0 1 1 1 1 1 1 0 1 0 10 X 0 1 1 1 1 1 1 1 1 0 0 1
0 0 1 1 1 1 1 1 1 1 1 1 0 1
ST 0IN1IN 2IN 3IN 4IN 5IN 6IN 7IN 2Y 1Y 0Y EXY
endcontrolYEX :
inputselectST:
1STNo matter if there
is signal at input ends,
the circuit will not have
output. The output islocked.
The encoderworks, the
encoding output
lies on the input
variables.
0STThe encoding circuit works, encoding signalinputs, and the output of encoder is binary
complement code.
Encoder works without encoding signal input.
1,,,, 012 EXYYYY
If only there is output code
0EXY
else
1EXY
0ST
Encoder works with encoding signal inputs.
outputselectYs:
1,,,, 012 YsYYYY EX
0Ys1Ys
Octal-to-Binary priority encoder fuction table
8/13/2019 13chap6(1)Encoder
14/16
:07 II
02 YY
3 control terminals:ST
Input control endselect input end.Enabled at low level. If /ST=0, encoder
works in normal, if /ST=1, all the outputare locked.
:EXYExpanding end. It is used to extend
the function of encoder.
Assume: 7I
0I
The input is active-low, and the output is complement code.
7
654321
E
Y
N
S
2
10
S
Y
I7 I6 I5 I4 I3 I2 I1 I0
ST YS
Y0Y1Y2YEX74LS148
8 input ends
3 binary output ends
Select output endhas the highest priority.
has the lowest priority.
6.2.2 Priority Encoder
Block Diagram of 74148 (Octal-to-inary Priority Encoder):
8/13/2019 13chap6(1)Encoder
15/16
Ex: Design a hexadecimal-to binary encoder using 74148 encoders.
Then EncodeIf there is no input with
815 II
According to the priority rights
07 II
Thus , it only needs to use noencoding input YS of the 1st
encoder as select input signal
/ST of the 2nd encoder.
If there is encoding signal inputs at the 1st encoder appropriateto output 4th bit of the encoding signal, and identify the, its /YEX=0,
if there is no encoding signal input, /YEX=1, it is encoding from 8
input signals at high-bit and 8 input signals at low-bit.
The encoding input at lowest 3 bits are logic AND of /Y2/Y1/Y0 of the two encoders.
I7 I6 I5 I4 I3 I2 I1 I0
S YS
Y0Y1Y2YEX
74LS148(1)
I7 I6 I5 I4 I3 I2 I1 I0
S YS
Y0Y1Y2YEX
74LS148(2)
& & & &G 2G3 G 1 G0
Z 0Z 1Z 2Z 3
A09A A18A A27A A 36A A45AA10A11A12A13A14A15
/S 0 1 2 3 4 5 6 7 /Y2 /Y1 /Y0 /YEX YS
1 X X X X X X X X 1 1 1 1 1
0 1 1 1 1 1 1 1 1 1 1 1 1 0
0 X X X X X X X 0 0 0 0 0 1
0 X X X X X X 0 1 0 0 1 0 1
0 X X X X X 0 1 1 0 1 0 0 1
0 X X X X 0 1 1 1 0 1 1 0 1
0 X X X 0 1 1 1 1 1 0 0 0 1
0 X X 0 1 1 1 1 1 1 0 1 0 1
0 X 0 1 1 1 1 1 1 1 1 0 0 1
0 0 1 1 1 1 1 1 1 1 1 1 0 1
6.2.3 Extend the Function of Encoder
Two 74148 encoders are required.
/I15 has the highest priority.
8/13/2019 13chap6(1)Encoder
16/16