Title: Encoder
1?????? ??????? ?????? ?????????
????? ???, ??? ?????????????????? ?? ????
- ????? ?? ?????? ??
- ???? ?????, ??????????? ?????? ?"?
2Encoder
- Encoder encodes bitstream or other signal or data
into a form that is acceptable for transmission
or storage. - A decoder does the reverse
- Endec does both
- Codec does both as well but in software
3Examples
- A modem is an endec
- A program that creates a compressed version of
music or video, say MPEG is a codec - MIME to send binary files over text email
- PGP to send encrypted messages
4?????? ??????? ?????? ?????????
????? Decoder
- n ?????? ??????? ???? ?????? ????? 02n-1
- 2n ?????? ???? ????? i ???? "1" ??"? ?????? ??
??? i.
(??????)
(?????)
??? ??? ??? ??? ??? ???
A1 A0 D3 D2 D1 D0
0 0 0 0 0 1
0 1 0 0 1 0
1 0 0 1 0 0
1 1 1 0 0 0
5?????? ??????? ?????? ?????????
??????? Decoders
?????? ??? ???? ?? ?????? ???? ? minterm
?????? ? ???? ??? 1 ??? ??? ? minterms ???
0. ????? ???? ?????? ?????? ??????.
6?????? ??????? ?????? ?????????
??????? Decoders
?????? ??? ???? ?? ?????? ???? ? minterm
?????? ? ???? ??? 1 ??? ??? ? minterms ???
0. ????? ???? ?????? ?????? ??????.
ENABLE
7?????? ????????
- ??????? ?????? ????? ??????? (????? ?????
- NAND ????? AND).
- ???? ?? Enable ??? "?????" ?? "????" ?? ??
?????.
E A1 A0 D0 D1 D2 D3
0 0 0 0 1 1 1
0 0 1 1 0 1 1
0 1 0 1 1 0 1
0 1 1 1 1 1 0
1 ? ? 1 1 1 1
???? ???? ???? ???? NAND ? Enable ????? ?"? ???
"0".
8???? ? Enable
(Enable ?????)
???? Decoder n?2n ?"? ??? n-1?2n-1, ?????? ???
Enable
- ???? Z0 ????? ?-Decoder ?????? ???? ???? ?"? xy
?? ?????? ??????? ????? 1. - ????? ?? ?-Decoder ?????? ????? ?????.
- ?????? ????? (????? ????? 4 ?????) ???? Z1.
9????? ???? ?????? ?"? Decoders
- ?"? ????? OR ?? ??????? ???????? ???? ???? ?????
??????. - ?????? ??? ??????? ???? ?????? ?-Decoder ????
???? ???? ???????? ??? ?"? Decoder ????.
????? ????? FA ?"? Decoder.
00 01 11 10
0 0 1 0 1
1 1 0 1 0
00 01 11 10
0 1
1 1 1 1
10????? FA ?"? 3?8 ????
2 ? 4
0
a
20
1
b
21
2
C
3
E
a
20
b
21
E
11????? ?????? ??????
MSB
LSB
00 01 11 10
0 1 1 1 0
1 1 1 0 1
A B C f
0 0 0 0 1
1 0 0 1 1
2 0 1 0 0
3 0 1 1 1
4 1 0 0 1
5 1 0 1 1
6 1 1 0 1
7 1 1 1 0
A
12????? ???? ????
???? ?? ??? ???????
B A C f
0 0 0 0 1
1 0 0 1 1
2 0 1 0 1
3 0 1 1 1
4 1 0 0 0
5 1 0 1 1
6 1 1 0 1
7 1 1 1 0
00 01 11 10
0 1 1 1 1
1 0 1 0 1
B
13????? ???? ????
???? ?? ??? ???????
B A C f
0 0 0 0 1
1 0 0 1 1
2 0 1 0 1
3 0 1 1 1
4 1 0 0 0
5 1 0 1 1
6 1 1 0 1
7 1 1 1 0
00 01 11 10
0 1 1 1 1
1 0 1 0 1
B
14??????? - Encoders
- ???? ??????? "?????" ??????
- 2n ??? ?????.
- n ??? ?????.
D0
A0
Encoder
D1
4?2
D2
A1
D3
??? ??? ??? ??? ??? ??? ???
D3 D2 D1 D0 A1 A0
0 0 0 1 0 0 ?0
0 0 1 0 0 1 ?1
0 1 0 0 1 0 ?2
1 0 0 0 1 1 ?3
- ??? ????? "??????" ???? ?????? ????? ?? ?? ??????.
????? "????" ???? ?? ??????
15????? ???????
D0
D1 D3
D1
A0
D2
D2 D3
A1
D3
- ?? D0 ???? "?????".
- ?????? ??? ???? ????? ?"? ???? OR ???? ??? ??
"??????" ?? ?????? ??? ?? ???? ? ???? ??????
???????? ??????? ??????? ????.
????? ???????? Priority Encoder
- 2n ??????.
- n ?????? ????? Valid.
???? "??????" ????.
16????? ???????? Priority Encoder
- ???? ????? ?? ???? ?????? (MSB) ????? "1".
D3 D2 D1 D0 A1 A0 V
0 0 0 0 0 0 0
0 0 0 1 0 0 1 0
0 0 1 ? 0 1 1 1
0 1 ? ? 1 0 1 2
1 ? ? ? 1 1 1 3
not valid
Valid
D1
D1
1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
D2
D2
D3
D3
D0
D0
A1 D2 D3
A0 D3 D1D2
V D0 D1 D2 D3
D3
A0
D2
A1
D1
V
D0
17?????? Multiplexer
????? ????? ???? ?? ?? ?????? ???? ??????? ????
??? ???? ?? ????? ?? ??????. ???? ????? ???? ??
???? ???? ??? ????? ?????? ?? ????? ??????? ?? ??
????? ????.
- 2n ??? ?????.
- n ??? ????? / ????? / ?????.
- ?? ????? ????.
MUX 4?1
I0
Y
I1
I2
I3
S1
S0
18?????? Multiplexer
????? ????? ???? ?? ?? ?????? ???? ??????? ????
??? ???? ?? ????? ?? ??????. ???? ????? ???? ??
???? ???? ??? ????? ?????? ?? ????? ??????? ?? ??
????? ????.
- 2n ??? ?????.
- n ??? ????? / ????? / ?????.
- ?? ????? ????.
MUX 4?1
I0
Y
I1
I2
I3
S1
S0
19????? ????
I0
S0
S1
I1
I2
I3
- ????? ???????? ??????? ?? Enable (?????).
- ???? ????? ??? ?????? ?? ????.
???? ????????
E S Output
0 ? All Os
1 0 Select
1 1 Select
20????? ???????? ????????? ?"? ??????
???? "?????" ???? ??????? ???? n ?????? ?????
????? ??? n ?????? ????. ???? ???????? ?????
??????. ???? 1 ?????? ??????? ?????? ??? ??????
????? ? "0" ????.
?????
FA BC
A B C F
0 0 0 1 0
0 0 1 1 1
0 1 0 1 2
0 1 1 1 3
1 0 0 0 4
1 0 1 0 5
1 1 0 0 6
1 1 1 1 7
1
21???? "???????"
- ????? ????? ???????? ??? ???? ????? ?????
??????. - ????? ???????? n-1 1
????
?????
A B C F
0 0 0 1
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1
22???? "???????"
- ????? ????? ???????? ??? ??? ????? ???? ??????.
- ????? ???????? n-1 1
????
?????
A B C F
0 0 0 1
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1
23????? ????? 2 ???? 2 ?????
A B C D F
0 0 0 0 0
0 0 0 1 0
0 0 1 0 0
0 0 1 1 1
0 1 0 0 0
0 1 0 1 1
0 1 1 0 1
0 1 1 1 0
1 0 0 0 1
1 0 0 1 1
1 0 1 0 1
1 0 1 1 0
1 1 0 0 1
1 1 0 1 0
1 1 1 0 0
1 1 1 1 1
CD
CÅD
CD
(CÅD)
C
CD
0
CÅD
1
f
CD
Y
2
D
s1
s0
3
(CÅD)
A
B