0% found this document useful (0 votes)
35 views1 page

8.Decimal-To-BCD Encoder - VHDL

Uploaded by

aboodalhoomsi9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views1 page

8.Decimal-To-BCD Encoder - VHDL

Uploaded by

aboodalhoomsi9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

M06_FLOY5983_11_GE_C06.indd Page 343 12/11/14 8:14 PM user /204/PH01677_PIV/9781292075983_FLOYD/FLOYD_DIGITAL_FUNDAMENTALS11_PIE_97812920759 ...

Encoders 343

Implementation: Decimal-To-BCD Encoder


Fixed-Function Device   The 74HC147 is a priority encoder with active-LOW inputs (0)
for decimal digits 1 through 9 and active-LOW BCD outputs as indicated in the logic sym-
bol in Figure 6–38. A BCD zero output is represented when none of the inputs is active.
The device pin numbers are in parentheses.
VCC

(16)

D4 1 16 VCC (11) HPRI/BCD


D1
(12)
D5 2 15 NC D2
(13)
D3 (9)
D6 3 14 A3 (1) 1 A0
D4 (7)
D7 4 13 D3 (2) 2 A1
D5 (6)
(3) 4 A2
D8 5 12 D2 D6 (14)
(4) 8 A3
A2 6 11 D1
D7
(5)
D8
A1 7 10 D9 (10)
D9
GND 8 9 A0
(8)

GND
(a) Pin diagram (b) Logic diagram

FIGURE 6–38 The 74HC147 decimal-to-BCD encoder (HPRI means highest value input
has priority.
Programmable Logic Device (PLD)   The logic of the decimal-to-BCD encoder shown in
Figure 6–38 can be described in VHDL for implementation in a PLD. The data flow approach
is used in this case.
entity DecBCDencoder is
˛˝¸

port (D1, D2, D3, D4, D5, D6, D7, D8, D9:
Inputs and outputs declared
in bit; A0, A1, A2, A3: out bit);
end entity DecBCDencoder;
architecture LogicFunction of DecBCDencoder is
begin
A0 6= (D1 or D3 or D5 or D7 or D9);
˛˚˚˝˚˚¸

A1 6= (D2 or D3 or D6 or D7); Boolean expressions for the


A2 6= (D4 or D5 or D6 or D7); four BCD outputs
A3 6= (D8 or D9);
end architecture LogicFunction;

EXAMPLE 6–11

If LOW levels appear on pins, 1, 4, and 13 of the 74HC147 shown in Figure 6–38, indi-
cate the state of the four outputs. All other inputs are HIGH.
Solution
Pin 4 is the highest-order decimal digit input having a LOW level and represents deci-
mal 7. Therefore, the output levels indicate the BCD code for decimal 7 where A0 is the
LSB and A3 is the MSB. Output A0 is LOW, A1 is LOW, A2 is LOW, and A3 is HIGH.
Related Problem
What are the outputs of the 74HC147 if all its inputs are LOW? If all its inputs are HIGH?

You might also like