Digital Electronics
Electronics Technology Landon Johnson
Encoding, Decoding, and Seven-Segment Displays
Encoder/Decoder Competencies
52. Given four different input combinations to a 10 line to 4 line encoder, the student will state the output combinations with 100% accuracy.
53. Given four different input combinations for a 4 line to 10 line decoder, the student will state the output combinations with 100% accuracy.
Encoder/Decoder Vocabulary
ENCODER- a digital circuit that produces a binary output code depending on which of its inputs are activated.
DECODER- a digital circuit that converts an input binary code into a single numeric output.
ENCODERS AND DECODERS
A0 A1 A2 A3 A4 A5 A6 A7 O0 O1 O2 ENCODER A0 A1 A2 DECODER O0 O1 O2 O3 O4 O5 O6 O7
ONLY ONE INPUT ACTIVATED AT A TIME BINARY CODE OUTPUT
BINARY CODE INPUT ONLY ONE OUTPUT ACTIVATED AT A TIME
THE 8421 BCD CODE
BCD stands for Binary-Coded Decimal.
A BCD number is a four-bit binary group that represents one of the ten decimal digits 0 through 9. Example:
Decimal number 4926
8421 BCD coded number 0100 1001 0010 0110
ELECTRONIC ENCODER -
DECIMAL TO BCD
BCD output Decimal input
0000 111
Decimal to BCD Encoder
7 5
3
0
Encoders are available in IC form. This encoder translates from decimal input to BCD output.
10 line to 4 line Encoder
10 line to 4 line Encoder
DECIMAL 8 ENCODER
9 5V 8 5V 7 5V 6 5V 5 5V 4 5V 3 5V 2 5V 1 5V 74147 I9 I8 I7 A3 I6 A2 I5 A1 I4 A0 I3 I2 I1
BINARY (BCD) 4 2 1
4 line to 10 line Decoder
DECIMAL 9 8 DECODER BINARY (BCD)
74LS42 9 8 7 6 5 4 3 2 1 0
7 6 5 4 3 2 1 0
8 0V 4 0V 2 0V 1 0V
A3 A2 A1 A0
DECODERS: BCD TO 7-SEGMENT DECODER/DRIVER
BCD input Decimal output LED
0000 111
BCD-to7-Segment Decoder/ Driver
Electronic decoders are available in IC form.
This decoder translates from BCD to decimal. Decimals are shown on an 7-segment LED display. This IC also drives the 7-segment LED display.
TEST
Q #1- What is the decimal output from the decoder that #5#4#3#2appears on the 7-segment display?
Answer: 3 6 7 9 0
BCD input
Decimal output
1 0 1 10 00 1 0 01 00
BCD-to7-Segment Decoder/ Driver
BCD-TO-SEV EN SEGMENT DECODER DRIVER
V+
abcdef g . 74LS47 A3 g A2 f A1 e A0 d c b a test RBI RBO
5V
TEST
A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 ENCODER O0 O1 O2 O3
INPUT A1=1 A4=1 A6=1 A8=1 O3 O2 O1 O0
TEST
A0 A1 A2 A3 DECODER O0 O1 O2 O3 O4 O5 O6 O7 O8 O9
A3 0 0 0 1
A2 0 1 1 0
A1 0 0 1 0
A0 0 1 1 1
OUTPUT
TEST
ANSWER THE FOLLOWING QUESTIONS WITH ONE OR MORE OF THESE WORDS: MUX, DEMUX, ENCODER, DECODER. A. Has more inputs than outputs. ENCODER, MUX B. Uses select inputs. MUX, DEMUX C. Can be used in parallel-to-serial conversion. MUX D. Produces a binary code at its output. ENCODER E. Only one of its outputs is activated at one time. DEMUX, DECODER F. Used to route input signals to one of several outputs. MUX G. Used to generate arbitrary logic functions. MUX, DEMUX H. 3 line-to-8 line or binary to octal. DECODER I. Data Selectors are also MUX.