# Encoders

Contents

## Encoder

Encoder is a combinational circuit which is designed to perform the inverse operation of the decoder. An encoder has n number of input lines and m number of output lines. An encoder produces an m bit binary code corresponding to the digital input number. The encoder accepts an n input digital word and converts it into an m bit another digital word.

### Block diagram

Examples of Encoders are following.

- Priority encoders
- Decimal to BCD encoder
- Octal to binary encoder
- Hexadecimal to binary encoder

## Priority Encoder

This is a special type of encoder. Priority is given to the input lines. If two or more input line are 1 at the same time, then the input line with highest priority will be considered. There are four input D_{0}, D_{1}, D_{2}, D_{3} and two output Y_{0}, Y_{1}. Out of the four input D_{3} has the highest priority and D_{0} has the lowest priority. That means if D_{3} = 1 then Y_{1} Y_{1} = 11 irrespective of the other inputs. Similarly if D_{3} = 0 and D_{2} = 1 then Y_{1} Y_{0} = 10 irrespective of the other inputs.