A decimal to bcd encoder has 10 input lines D_{0} to D_{9} and 4 output lines Y_{0} to Y_{3}. Below is the **truth table for a decimal to bcd encoder**.

From the truth table, the outputs can be expressed by following Boolean Function.

Note: Below boolean functions are formed by ORing all the input lines for which output is 1. For instance Y_{0 }is 1 for D_{1}, D_{3}, D_{5}, D_{7} & D_{9 }input lines.

**Y _{0 } = D_{1 }+ D_{3 }+ D_{5 }+ D_{7 }+ D_{9}**

**Y _{1 } = D_{2 }+ D_{3 }+ D_{6 }+ D_{7}**

**Y _{2 } = D_{4 }+ D_{5 }+ D_{6 }+ D_{7}**

**Y _{3 } = D_{8 }+ D_{9}**

The decimal to bcd encoder can therefore be implemented with OR gates whose inputs are determined directly from truth table as shown in the image below.

#### Limitations With Decimal To BCD Encoder

A decimal to bcd encoder has limitations similar to octal to binary encoder.

- For 10 bits input, there can be 2
^{10 }possible combinations, out of which only 10 are used using 4 output lines. - The discrepancy of 0 output due to all inputs being 0 or D
_{0}being 0 is resolved by using additional input known as Enable - Only one input can be active at any given time.

We will learn about Priority Encoders in next post.

Its nice and simple

him