banner_Encoders.gif (10645 bytes)

An encoder is a combinational logic circuit that essentially performs the opposite function of the decoder circuit. An encoder accepts an active level (i.e. ‘1’) on one of its inputs representing a digit (e.g. decimal or octal digit) and converts it to a coded output (e.g. binary of BCD). The process of converting from familiar symbols or numbers to a coded format is called encoding.

The Decimal-to-BCD Encoder

Recall that with BCD the ten decimal digits (0,1,…,9) are represented by their four-digit binary counterparts. Consequently, we expect the Decimal-to-BCD encoder to have 10 inputs and 4 outputs. The logic symbol for this 10-line-to-4-line decoder is presented in Figure 2-11 and the associated conversion table listed in Table 2-13 with A3 representing the most significant bit.

fig2-11.gif (3352 bytes)

Figure 2-11 Logic symbol for Decimal-to-BCD Encoder

 

Decimal Digit

BCD Code

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

Table 2-13 Decimal-to-BCD code table

Now, note that the MSB is defined by the function

A3 = 8 + 9

 

Similarly, A2, A1 and A0 are defined by the functions

A2 = 4 + 5 + 6 + 7

A1 = 2 + 3 + 6 + 7

A0 = 1 + 3 + 5 + 7 + 9

 

Now we can implement the logic circuit for the decimal-to-BCD-decoder as illustrated in Figure 2-12.

 

 fig2-12.gif (5230 bytes)

Figure 2-12 Logic circuit for Decimal-to-BCD encoder

 

Note that a connection for the decimal digit zero is not required as in this case the BCD outputs are all LOW when there are no HIGH inputs.

Can you identify any applications where encoders are used?

 

back2.gif (5659 bytes)next2.gif (4645 bytes)

 


Copyright © Adrian Als , 1999
This page was last modified: Wednesday, April 12, 2000