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

Super Bowl LVIII: Date, Time, & Streaming Guide

  Brock Purdy (left) and Patrick Mahomes (right) (Credit: Kevin Sabitus/Getty Images, Kirby Lee/USA Today Sports, Patrick Smith/Getty Images) The countdown to Super Bowl LVIII has begun after the conference championship games. The logo, introduced in February 2023, is an updated version of Super Bowl LVI introduced in 2021. The game was supposed to be in New Orleans, according to an announcement made in 2018. However, the league made some changes in the candidate selection. Now, the league selects the candidates on merit instead of letting the cities bid for the game, which raised a conflict in New Orleans. Thus, the league shifted to Allegiant Stadium, Paradise, Nevada. It will be conducted for the third time in the Western US in a row. Each team must possess a ball before the judges declare the winner, and the teams will have an opportunity to do so. A ticket costs $8,533 on Ticketmaster. The possibility of the NFL being scripted is a topic of debate because the predictions...

Planning For A Wedding? Know This First

Are you worried about the family drama, budget, catering services, fashion, wedding cards, venue, photography, make-up, mehndi, and decorations for your wedding?  Have a look at these Wedding Planning tips. Here’s what To Plan 1.  The basic point: Plan the budget. Plan and work on the budget at the earliest, even 12 months before the wedding day. Want to keep some room in your wallet? Cutting down the guest list can trim the wedding budget, though it may be brutal. The biggest part of the budget should be reserved for reception. Some extra percentage of the budget should be allocated for unplanned expenses such as printing extra invitation cards. Be straightforward while discussing with the respective vendors. Assign task priorities in the wedding. Cut the corners of the least important requirements spend more on the most important ones. Discuss the facilities and budget with various vendors, compare them and choose the best one. Hire a budget-friendly wedding pla...

Meet OpenAI’s Sora

  OpenAI Introduces Sora Scriptwriters might soon lose their jobs because OpenAI teaches AI to simulate the physical world. Meet OpenAI’s Sora, which helps people generate videos within a few minutes. The company created DALL-E, the text-to-image model, and its versions and announced them in 2021. People began using the ChatGPT image generator by late 2023 and must be ready for the video generator, too. The company continues to research Sora and make changes according to the results. Thus, it can prove to people what wonders AI can do. OpenAI claims to reach out to artists, educators, and policymakers around the world to experience that. However, it still does not know how people will use or misuse the product.   Prompt: A Chinese Lunar New Year celebration video with Chinese Dragon. Meet OpenAI’s Sora Meet OpenAI’s Sora, a text-to-video model that creates minute-long videos according to the text mentioned by the user. Thus, the company aims to solve issues in the real w...