Professional Documents
Culture Documents
Decoder
2-to-4,
3-to-8,
n-to-2n
S2
S1
S0
3:8
dec
O0
O1
O2
O3
O4
O5
O6
O7
Enb
ABC
ABC
ABC
ABC
ABC
ABC
ABC
ABC
B C O0 O1 O2 O3 O4 O5 O6 O7
Decoder
Example:
S3
S2
S1
S0
4:16
dec
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
ABCD
A BCD
ABCD
ABCD
ABCD
ABCD
ABCD
A BCD
A BCD
A BCD
A BCD
A BCD
A B CD
A B CD
A B C D
AB C D
F1
F2
F3
Enb
Active Low
Decoder with
Active Low Enable
Active Low Outputs
Y0 Y1 Y2 Y3
Decoders
Can build a decoder by smaller decoders
A
A
B
S3
S2
S1
S0
4:16
dec
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
S2
S1
S0
3:8
dec
Enb
O0
O1
O2
O3
O4
O5
O6
O7
B
C
S2
S1
S0
3:8
dec
Enb
O0
O1
O2
O3
O4
O5
O6
O7
Enb
10
Decoders
How to build a 5-32 decoder by
using 4-16 and 2-4 decoders?
11
Decoders
12
7-Segment Decoder
Seven-segment display:
7 LEDs (light emitting diodes), each one
a
controlled by an input
1 means on, 0 means off
f
b
Display digit 3?
g
Set a, b, c, d, g to 1
e
c
Set e, f to 0
d
13
7-Segment Decoder
C0
C5
C6
C4
C3
C1
C2
C C C C C C C
0 1 2 3 4 5 6
BCD-to-7-segment
control signal
decoder
D
14
7-Segment Decoder
7-Segment Decoder:
Input is a 4-bit BCD code 4 inputs (A, B, C,
D).
Output is a 7-bit code (a,b,c,d,e,f,g) that
allows for the decimal equivalent to be
displayed.
a
Example:
Input: 0000BCD
Output: 1111110
(a=b=c=d=e=f=1, g=0)
b
c
d
15
ABCD
abcdefg
Digit
ABCD
abcdefg
0000
1111110
1000
0001
0110000
1001
1111111
1110011
111X011
0010
1101101
1010
XXXXXXX
0011
1111001
1011
XXXXXXX
0100
0110011
1100
XXXXXXX
XXXXXXX
0101
1011011
1101
1110
XXXXXXX
0110
X011111
1011111
1111
XXXXXXX
0111
11100X0
1110000
??
16
K-maps
AB
00
01
11
10
00
01
CD
AB
00
01
11
10
00
01
CD
11
10
11
10
00
01
00
01
11
10
00
01
CD
11
01
11
10
B
K-map for c
A
00
01
11
10
00
01
CD
11
00
01
11
10
00
01
11
10
CD
X
C
C
10
AB
C
10
AB
D
11
AB
01
K-map for b
A
00
00
K-map for a
CD
10
AB
11
C
1
01
C
10
00
CD
D
11
AB
10
K-map for d
K-map for e
K-map for f
K-map for g
a = A + B D + C + B' D'
b = A + C' D' + C D + B'
c = A + B + C' + D
Encoder
Encoder
Encoder:
the inverse operation of a decoder.
Has 2n input lines and n output lines.
The output lines generate the binary
equivalent of the input line whose value is 1.
I0
I1
I2
I3
4-2
Binary
Encoder
z1
z2
19
Encoder
S2
S1
S0
O0
O1
O2
O3
3:8
decoder O4
O5
I0
I1
I2
I3
I4
I5
O6
O7
I6
I7
Z2
Z1
8:3
encoder
Z0
B
C
20
A0 = D1 + D3 + D5 + D7
A1 = D2 + D3 + D6 + D7
A2 = D4 + D5 + D6 + D7
21
Encoder Circuit
With Enable
With Acknowledge
22
Application
A0 = D1 + D3 + D5 + D7
A1 = D2 + D3 + D6 + D7
A2 = D4 + D5 + D6 + D7
24
Priority Encoder
Multiple asserted inputs are allowed;
one has priority over all others.
25
K-Maps
26
Circuit
27
28
74x148
Features:
29
30
Datasheets
http://www.techlearner.com/C&D/index.htm
http://users.otenet.gr/~athsam/database.htm
Some sample datasheets in the course site.
32