Page Contents

*#Technical Studies – Study 27*

*#Technical Studies – Study 27*

*Introduction*

*Introduction*

Encoders are combinational logic circuits that convert numbers and alphabets into coded formats. We can also say that encoder is a logic circuit that performs the reverse operation of decoder. It takes numbers of inputs and converts into n numbers of outputs. It can produce output for one output activated at a time.

Let’s assume n = 2

See Also:

What is number systems in Digital Electronics?

**Books for personal improvement**

So the encoder will have inputs and 2 outputs.

This circuit will be called as 4 to 2 encoder.

Block diagram of 4 to 2 encoder:

In the diagram above D0, D1, D2, D3 are 4 inputs and A and B are 2 outputs. The truth table of this circuit is given below.

From the above truth table A = D2+D3

And B = D1 + D3

So the logic circuit of this encoder is as given below –

*Octal to binary encoder:*

*Octal to binary encoder:*

If we take the value of n = 3, the encoder circuit will have

If we take the value of n = 3, the encoder circuit will have

inputs and 3 outputs. The block diagram of octal to binary encoder is given below.

The truth table of octal to binary encoder is given below.

From the truth table –

A = D4+D5+D6+D7

B = D2+D3+D6+D7

C = D1+D3+D5+D7

So the logic circuit of octal to binary encoder will be as given below.

*Priority encoder: *

*Priority encoder:*

An encoder takes one input at a time and converts it into coded format. What if more than one input is given to an encoder at a time? An example of such case is keyboard press. A user can press 2 or 3 keys at a time in a keyboard. Therefore priority encoder is used to ease the operation.

A priority encoder considers the input that has highest priority and produces the output accordingly.

Remember the 4 to 2 encoder we have discussed above. Add another output bit called valid bit V in the output section of the truth table. This bit becomes low when all the inputs are low and high when one or more inputs are high.

Now the truth table will look as below –

From the truth table

A = D3 + D2

B = D3 +

V = D3+D2+D1+D0

The logic circuit of the encoder will be as given below.

Please write in the comment box below if you have any questions.