”;
An encoder is a combinational logic circuit that is used to convert a normal or familiar information into a coded format. In other words, an encoder is a digital device that coverts a piece of information represented in the form of decimal digits and alphabetic characters into a coded form like binary representation. The operation that the encoder performs is termed as encoding.
In this chapter, we will explain the basics of encoder and commonly used types of encoders.
What is an Encoder?
An encoder is a digital combinational circuit that converts a human friendly information into a coded format for processing using machines. In simple words, an encoder converts a piece of information normal form to coded form. This process is called encoding.
Encoders are crucial components in various digital electronics applications such as data transmission, controlling and automation, communication, signal processing, etc.
An encoder consists of a certain number of input and output lines. Where, an encoder can have maximum of “2n” input lines whereas “n” output lines. Hence, an encoder encodes information represented by “2n” input lines with “n” bits.
The block diagram of an encoder is shown in the following figure −
Let us now discuss different types of encoders commonly used in digital electronic applications.
Types of Encoders
Some of the commonly used types of encoders in digital electronics −
- 4 to 2 Encoder
- 8 to 3 Encoder (Octal Encoder)
- Decimal to BCD Encoder
Let us now discuss these three types of most commonly used encoders in detail.
4 to 2 Encoder
A 4 to 2 Encoder is a type of encoder which has 4 (22) input lines and 2 output lines. It produces an output code (i.e., convert input information in a 2-bit format) depending on the combination of input lines.
The block diagram of a 4 to 2 Encoder is shown in the following figure.
The working of a 4 to 2 Encoder for different input combinations is described in the following truth table −
Inputs | Outputs | ||||
---|---|---|---|---|---|
I3 | I2 | I1 | I0 | Y1 | Y0 |
0 | 0 | 0 | 1 | 0 | 0 |
0 | 0 | 1 | 0 | 0 | 1 |
0 | 1 | 0 | 0 | 1 | 0 |
1 | 0 | 0 | 0 | 1 | 1 |
From this truth table, we can derive the Boolean expression for each output of the 4 to 2 Encoder as follows −
$$\mathrm{Y_{0} \: = \: I_{1} \: + \: I_{3}}$$
$$\mathrm{Y_{1} \: = \: I_{2} \: + \: I_{3}}$$
It is clear that we can implement the logic circuit of the 4 to 2 Encoder using two OR gates. The following figure depicts the logic diagram of the 4 to 2 Encoder.
Applications of 4 to 2 Encoder
The 4 to 2 Encoder is widely used in the following applications: Data multiplexing, Generating digital control signals, Address decoding applications, Encoding data in digital systems, etc.
Octal to Binary Encoder
The octal to binary encoder is a type of encoder that converts an octal code into binary code. It accepts 8 input lines and produces a 3-bit output depending on the combination of input lines. Therefore, it is also known as 8 to 3 Encoder.
The block diagram of an octal to binary encoder is shown in the following figure −
The following truth table describes the working of an octal to binary encoder −
Inputs | Outputs | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
I7 | I6 | I5 | I4 | I3 | I2 | I1 | I0 | Y2 | Y1 | Y0 |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 |
0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 |
0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 |
0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 |
0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 |
0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 |
1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 |
From this truth table, we can write the Boolean expression for the outputs of the octal to binary encoder as follows.
$$\mathrm{Y_{0} \: = \: I_{1} \: + \: I_{3} \: + \: I_{5} \: + \: I_{7}}$$
$$\mathrm{Y_{1} \: = \: I_{2} \: + \: I_{3} \: + \: I_{6} \: + \: I_{7}}$$
$$\mathrm{Y_{2} \: = \: I_{4} \: + \: I_{5} \: + \: I_{6} \: + \: I_{7}}$$
From these expressions, it is clear that the implementation of an octal to binary encoder requires 3 OR gates.
The logic circuit diagram of the octal to binary encoder is shown in the following figure −
Applications of Octal to Binary Encoder
The octal to binary encoder is used in the following applications −
- Data conversion in digital systems.
- Conversion of octal memory addresses into binary memory addresses.
- In microprocessors and microcontrollers, to convert octal instructions into binary format.
- In communication systems, to encode octal data into binary form for transmission, etc.
Decimal to BCD Encoder
A type of encoder that can convert a decimal number or information represented using decimal number into its equivalent binary-coded decimal (BCD) format is known as a decimal to BCD encoder.
In the BCD encoding scheme, each decimal digit can be converted into a 4-bit binary representation. The following table shows the BCD equivalents of decimal digital from 0 to 9.
Decimal Digit | BCD Code | |||
---|---|---|---|---|
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 |
The decimal to BCD encoder accepts 10 input lines and produces a 4-bit BCD output depending on the combination of input lines. Therefore, sometimes it is also called a 10 to 4 encoder.
The following illustration depicts the block diagram of a decimal to BCD encoder.
The truth table describing the working of the decimal to BCD encoder is given blow −
Inputs | Outputs | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
D9 | D8 | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 | Y3 | Y2 | Y1 | Y0 |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 |
0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 |
0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 |
0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 |
0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 |
0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 |
0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
From this truth table, we can write the Boolean expression of the decimal to BCD encoder as follows.
$$\mathrm{Y_{0} \: = \: D_{1} \: + \: D_{3} \: + \: D_{5} \: + \: D_{7} \: + \: D_{9}}$$
$$\mathrm{Y_{1} \: = \: D_{2} \: + \: D_{3} \: + \: D_{6} \: + \: D_{7}}$$
$$\mathrm{Y_{2} \: = \: D_{4} \: + \: D_{5} \: + \: D_{6} \: + \: D_{7}}$$
$$\mathrm{Y_{3} \: = \: D_{8} \: + \: D_{9}}$$
The logic circuit of the decimal to BCD encoder can be implemented using four OR gates which is shown in the following figure −
Applications of Decimal to BCD Encoder
Decimal to BCD encoders find their application in digital clocks and timers, data processing devices and storage systems, calculators, measuring instruments, display devices, microprocessors, microcontrollers, embedded systems, etc.
Conclusion
An encoder converts a piece of information in a certain coded format. Encoders are essential elements in various digital systems such as automation and control systems, communication systems and storage units, computing and calculating devices, measuring instruments, data converters, and more.
In this chapter, we covered the most widely used types of encoders, they are 4 to 2 Encoder, octal to binary encoder, and decimal to BCD encoder.
”;