You are on page 1of 24

Encoder & Decoder

Module 2
Encoders and Decoders

• Ex Binary Decoder and Encoder


– Encoder  2n inputs, n outputs
– Decoder  n inputs, 2n outputs
Encoder
• Binary Encoder
Binary Encoder
• Example 8-to-3 line encoder
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
8-to-3 Encoder
Ex - Decimal to BCD Encoder
BCD Code
Decimal Digit A3 A2 A1 A0
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
Ex - Decimal to BCD Encoder
Decoder
• Example : Binary Decoders

w0 y0

N
inputs 2N
wn – 1
outputs

y2n
Enable En – 1

Active-high or active-low
Active-high or active-low
Decoder
• Example : Binary Decoders  2 to 4 Decoder
2 to 4 Decoder
Decoder with Enable
3 to 8 Decoder
3 to 8 Decoder
BCD to Seven Segment Decoder
• Seven Segment Display
– Common anode
– Common cathode
BCD to Seven Segment Decoder
BCD to Seven Segment Decoder
BCD to Seven Segment Decoder
BCD to Seven Segment Decoder
BCD to Seven Segment Decoder
BCD to Seven Segment Decoder
BCD to Seven Segment Decoder
BINARY TO GRAY CODE CONVERTER
GRAY CODE TO BINARY CONVERTER

You might also like