Skip to main content

Encoders And Decoders In Digital Electronics

The main focus will be on the Encoders and Decoders in Digital Electronics here. But first, we will have to learn about Multiplexers and Demultiplexers. Multiplexers and Demultiplexers also work together as many communication systems are bidirectional.

Multiplexer

It follows the many-to-one rule. It is a combinational circuit that has at most 2n data inputs where 'n' is the number of 'selection lines.' Out of these input lines, anyone is selected and routed to form the only output line.

The input consists of analog or digital data.

To handle analog signals, transistor switches and relays are used to build the multiplexer.

To handle digital signals, logic gates are used to build the multiplexer.

Some types of Multiplexers

  • 2-to-1 Multiplexer(with 1 select line).
  • 4-to-1 Multiplexer(with 2 select lines).
  • 8-to-1 Multiplexer(with 3 select lines).
  • 16-to-1 Multiplexer(with 4 select lines).

Applications of Multiplexers

  1. It is used as a one-way rotary switch also called the wafer switch. The input is selected by rotating the shaft.
  2. Video and audio data can be transferred through the cables from various channels.
  3. A GSM satellite is used by the ground system when a satellite's computer system has to communicate data signals with it. Multiplexer plays a key role here.
  4. The modulation occurs in the transmitter. Before the audio enters the transmitter, subcarriers are added to it. This process is called Multiplexing. Referring to this, Multiplexing, sometimes, is also known as MPX.
  5. A huge amount of memory can be kept on the computer by using a Multiplexer. Thus, the number of copper lines connecting the memory with the other parts of the computer can also be decreased.

Demultiplexer

It follows the one-to-many rule. It is a combinational circuit that has a single input line and 2n output lines where 'n' is the number of select lines. A multiplexer does the encoding of multiple input signals using a wire while a Demultiplexer does the opposite. The choice of the output line for forwarding the input depends on the value of the selection lines.

Some types of Demultiplexers

  • 1-to-2 Demultiplexer(with 1 select line).
  • 1-to-4 Demultiplexer(with 2 select lines).
  • 1-to-8 Demultiplexer(with 3 select lines).
  • 1-to-16 Demultiplexer(with 4 select lines).

Applications of Demultiplexers

  1. The ALU and parallel data circuits can be reconstructed using Demultiplexer.
  2. The video and audio data signals transmitted using the Multiplexer at the sender's end are converted into the original form at the receiver's end using the Demultiplexer. Subtitles can also be regenerated using the same.
  3. Demultiplexer can also get its input from the output of an ALU. Thus, the output can be stored in various storage units or registers.
  4. The serial data stream can be reconstructed into parallel data using Demultiplexer. Accordingly, it should get the serial input data stream at fixed intervals. The input to the Demultiplexer has to be controlled by attaching a counter. The final output can then be read in parallel after all the data signals get stored.
  5. A Demultiplexer helps design the digital logic. It can be used as a binary decoder if its input is always true.

Now we will move to the main topic.

Encoder

The applied input signal is changed in a coded binary format at the output using an Encoder. An encoder is a combinational circuit that falls under the category of Medium Scale Integrated Circuit. It has maximum '2n' input lines, out of which at most one will be high(or activated) at a time, and 'n' output lines. Encoder thus helps to decrease the number of data lines.

Some Types Of Encoders

  • Priority Encoder.
  • Octal to Binary Encoder.
  • Hexadecimal to Binary Encoder.
  • Decimal to BCD Encoder.

A 4:2 Binary Encoder

A 4:2 Binary Encoder

Here,

Number of output lines(n) = 2

Number of input lines(2n) = 4

If the input line I0(0,0) is activated, then the output will be 0,0(Y0=0, Y1=0). Similarly, if the input line I1(0,1) is activated, then the output will be 0,1(Y0=0, Y1=1) and so on…

The following Truth Table shows the same.

The Truth Table of 4:2 Binary Encoder

The Circuit Diagram of 4:2 Binary Encoder

A Priority Encoder

The Truth Table of 4:2 Binary Encoder shows that when the input '1' is applied to the input line I0, both the output lines Y0 and Y1 are high at the same time. This produces ambiguity.

The Priority Encoder provides a solution by prioritizing every input level. The highest priority will be assigned to the MSB and the lowest to the LSB. Inputs having lower priority will be ignored in the presence of the input with higher priority.

Truth Table of a 4:2 Priority Encoder

A Priority Encoder is also called a P-Encoder, Leading Zero Counter (LZC), Leading Zero Detector (LZD). Recursion can be used to efficiently construct the Priority Encoders.

Circuit Diagram of a 4:2 Priority Encoder

Decoder

It transfers the coded input into another form of coded output. In this combinational logic circuit, the input and the output are different from each other. It can also be said to perform the inverse operation of an Encoder. It has ‘n’ number of input lines, an ‘Enable input,’ and maximum ‘2n’ output lines. Out of these output lines, only one will be high(or active) at a time. It thus detects a certain code. The output will be generated only when the ‘Enable input’ line will have the value ‘1.’ No output will be produced for input ‘0.’ For that, AND Gates are fed with the ‘Enable input.’


Truth Table of 2:4 Decoder
Circuit Diagram of 2:4 Decoder

Some Types Of Decoders

  • 2-to-4 Decoder.
  • 3-to-8 decoder.
  • 4-to-16 decoder.

Applications Of Decoders

  1. The main application is in data multiplexing and demultiplexing(or data distribution).
  2. For port-mapped and memory-mapped input/output i.e. in addressing core memory.
  3. For interfacing to Seven-segment displays.
  4. For traffic lights.
  5. To turn the devices ON or OFF at certain intervals by acting as the timing signal.

Comments

Popular posts from this blog

Xampp Server: All You Need To Know

Introduction to Xampp Server Xampp stands for Cross-platform(X), Apache, Maria DB(formerly MySQL), PHP, and Perl. Xampp Server is a cross-platform, free, and open-source package. It is developed by Apache friends and allows to run the PHP programs on a local server. It is available in a 32-bit and a 64-bit package separately. The main components of Xampp Server are: ·          Cross-platform(X): It works across multiple types of platforms and/or operating environments like macOS, Linux, or Windows. ·          Apache: Manages to cache, handles incoming requests and hands them over to the processor, handles buffering, looks at basic authorization access, takes care of input/output throttling. It is a bunch of PHP, phpMyAdmin, FTP, and MySQL. ·          Maria DB/MySQL: Stores persistent data is stored by this across requests. Services of data storage, data retrieva...

Legal Battle Between OpenAI And Elon Musk

Elon Musk And Sam Altman (Credit: Getty Images for Vanity Fair) OpenAI claims to develop safe, beneficial, and economically valuable AI. Elon Musk is one of the initial board members of OpenAI, while Sam Altman is the co-founder and CEO. Both expressed concern over AI overpowering humans, which might cause an ‘intelligence explosion.’ Thus, the company wants to help people through AI rather than posing a threat to mankind. Elon Musk’s Lawsuit Last month, Musk sued OpenAI and its CEO, Sam Altman, for allegedly breaching the company’s founding statement of freely collaborating with institutions and researchers and being open to the public. The company dealt with Microsoft, one of the investors, who would help it get a profit of $13 billion. Now, Musk wants OpenAI to give Microsoft its money back. Thus, according to Musk, OpenAI became a profit maximization company. He believe...

Conor McGregor Broke the Silence On Joining WWE

Conor Anthony McGregor (Credit:  AP Photo/John Locher, Brian Lawless/PA) Conor Anthony McGregor is a 35-year-old UFC champion, professional boxer, and mixed martial artist. Conor McGregor Broke the Silence On Joining WWE, which answered his fans to some extent. People know him as ‘The Notorious’ UFC fighter due to his trash talk and several controversies. His net worth is over $200 million, and people suppose he earned every penny by boxing in the ring. Conor McGregor Broke the Silence On Joining WWE Conor openly confessed to being interested in WWE and fighting against Roman Reigns and called a match, though the matter was not taken further. Conor had been in a heated argument with the WWE star’s Special Counsel, Paul Heyman. Thus, his fans have been waiting for his decision regarding his entry into WWE. Finally, Conor McGregor Broke the Silence On Joining WWE. He mentioned the possibility of doing so to a representative from the YouTube Channel...