Engineers Garage

  • Electronics Projects and Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

Building Encoder and Decoder using SN-7400 Series ICs – DE Part 15

By Hai Prasaath K August 10, 2018

In the previous tutorial – More Combinational Circuits, the basic concepts of encoder, decoder, multiplexer and demultiplexer were discussed. An encoder is used to code digital information according to a pre-defined code system (like BCD, Gray, etc). An encoder inputs data (like from a keypad or keyboard) representing familiar numbers or characters or symbols and output coded binary numbers. So, it inputs the alphabetic characters and decimal numbers from an input device via individual wire lines and produces the outputs as binary coded representation of the input symbols.

In communication systems, encoders are used for transmitting the digital information. There, the encoders reduces the number of bits needed to represent digital information, so that, the transmission link could transfer the encoded information using fewer lines. The encoders are also used for encoding the data which is to be stored for later use as it facilitates fewer bits storing over the available space.

The decoders perform inverse operation of encoders. They are used to decode binary codes into respective minterms which in turn represent individual symbols and characters. Both encoder and decoder are combinational circuits as their output depends only on current values of the input.

In this tutorial, the encoder and decoder circuits will be constructed using 7400 Series ICs. From the previous tutorial, it must be known that a decoder can be constructed using NOT and the AND gates. In this tutorial, a 2-to-4-line decoder will be constructed using 7404 IC for NOT gates and 7411 IC for AND gates. Similarly an encoder can be constructed using OR gate, AND gate and NOT gates. Here, a 4-to-2-line encoder is constructed using 7404 IC for NOT gate, 7408 IC for AND gate and 7432 IC for OR gate.

Components Required –

List of components used for making SN-7400 Series IC based Encoder and Decoder

Fig. 1: List of components used for making SN-7400 Series IC based Encoder and Decoder

Circuit Diagrams –

The 2-to-4-line decoder has the following circuit diagram –

Circuit Diagram of 2 to 4 Line Decoder

Fig. 2: Circuit Diagram of 2 to 4 Line Decoder

The 4-to-2-line encoder has the following circuit diagram –

Circuit Diagram of 4 to 2 Line Encoder

Fig. 3: Circuit Diagram of 4 to 2 Line Encoder

Circuit Connections –

Both decoder and encoder are combinational circuits. Their output depends only on the current value of inputs. Each circuit has a unique truth table from which the respective boolean expression for each output can be derived. The minimized boolean expression is then converted into logic gate diagram which is built on a breadboard using 7400 series ICs.

The following logic gate ICs are used in the construction of the circuits –

7411 IC – The 7411 IC is triple 3-input AND gate IC. The IC has the following pin configuration –

Table Listing Pin Configuration of 7411 IC

Fig. 4: Table listing pin configuration of 7411 IC

The IC has the following pin diagram –

Pin Diagram of 7411 IC

Fig. 5: Pin Diagram of 7411 IC

The IC requires a supply voltage of 5V which can be tolerated up to 5.25V. The voltage at the inputs of AND gates must be 2V for high logic and 0V for low logic. The output of the AND gates has a voltage of 3.4 V for high logic and up to 0.8 V for low logic. The IC operates on positive logic system. The propagation delay while transiting from LOW to HIGH level at the output ranges between 4 to 18 ns while propagation delay while transiting from HIGH to LOW level at the output ranges between 3 to 18 ns.

7408 IC – The 7408 IC has quad 2-input AND gates. The IC has the following pin configuration –

Table Listing Pin Configuration of 7408 IC

Fig. 6: Table listing pin configuration of 7408 IC

The IC has the following Pin Diagram –
Pin Diagram of 7408 IC

Fig. 7: Pin Diagram of 7408 IC

The IC requires a supply voltage of 5V which can be tolerated up to 7V. The voltage at the inputs of AND gates must be 2V for high logic and 0V for low logic. The output of the AND gates has a voltage of 3.4 V for high logic and 0.2 V for low logic. The IC operates on positive logic system. The propagation delay while transiting from LOW to HIGH level at the output is 27 ns while propagation delay while transiting from HIGH to LOW level at the output is 19 ns.

7432 IC – The 7432 IC has quad 2-input OR gates. The IC has the following pin configuration –

Table Listing Pin Configuration of 7432 IC

Fig. 8: Table listing pin configuration of 7432 IC

 The IC has the following Pin Diagram –
Pin Diagram of 7432 IC

Fig. 9: Pin Diagram of 7432 IC

The IC requires a supply voltage of 5V which can be tolerated up to 7V. The voltage at the inputs of OR gates must be 2V for high logic and 0V for low logic. The output of the OR gates has a voltage of 3.4 V for high logic and 0.35 V for low logic. The IC operates on positive logic system. The propagation delay while transiting from LOW to HIGH level at the output comes 3 to 15 ns while propagation delay while transiting from HIGH to LOW level at the output also comes 3 to 15 ns.

7404 IC – The 7404 IC has six inverting gates. The IC has the following pin configuration –

Table Listing Pin Configuration of 7404 IC

Fig. 10: Table listing pin configuration of 7404 IC

 The IC has the following Pin Diagram –
Pin Diagram of 7404 IC

Fig. 11: Pin Diagram of 7404 IC

The IC requires a supply voltage of 5V which can be tolerated up to 7V. The voltage at the inputs of NOT gates must be 2V for high logic and 0.8 V for low logic. The output of the NOT gates have a voltage of 3.4 V for high logic and 0.2 V for low logic. The IC operates on positive logic system. The propagation delay while transiting from LOW to HIGH level at the output is 22 ns while propagation delay while transiting from HIGH to LOW level at the output is 15 ns.

It must be noted that the selected ICs have compatible input, output and supply voltage levels as they are taken from a common family (74XX series) of digital ICs.

How the circuit works –

For constructing the 2-to-4-line decoder and 4-to-2-line encoder circuit, first of all, their truth table must be known. From the truth table, the boolean expressions for each output line can be derived. The boolean expression relates the output variables with the input variables by respective boolean equation. The derived boolean equations can be realized by interconnecting logic gates accordingly. The encoder and decoder circuits are constructed as follow –

4-to-2-line Encoder – An encoder is a digital circuit that performs inverse operation of a decoder. An encoder has 2n input lines and n output lines. In encoder the output lines generates the binary code corresponding to the input value. In a 4-to-2-line encoder, there are four inputs representing any four symbols or characters and two outputs that generate the corresponding binary code. In an encoder circuit, it is assumed that only one input is passed at a time, so only one line is set HIGH at any given time. The circuit constructed here is based on positive logic system. It has an ambiguity that when all inputs are zero the outputs are zero. The 4-to-2-line encoder has the following truth table –

Truth Table of 4 to 2 Line Encoder

Fig. 12: Truth Table of 4 to 2 Line Encoder

From the above truth table, the outputs Y0 and Y1 are derived to have the following boolean expressions –

Y0 = D3 + D2’D1

Y1 = D3 + D2

So, the encoder circuit can be constructed using OR gate, AND gate and NOT gates. Here, for constructing the 4-to-2-line encoder 7404 IC for NOT gate, 7408 IC for AND gate and 7432 IC for OR gate are used.

2-to-4-Line Decoder – A decoder is a multiple input multiple output logic circuit which converts coded input into coded output where input and output codes are different. The input code generally has fewer bits than the output code. Each input code word produces a different output code word i.e. there is one to one mapping which can be expressed in truth table. In a decoder circuit, the encoded information is present as n input producing 2n possible outputs. The 2n output values range from 0 to 2n – 1.

A 2-to-4-line decoder can interpret 4 symbols or characters. There are two inputs that can have input values ranging from 00 to 11 and at the output, there are 4 lines. The decoder constructed here has an additional enable input to switch on and off the decoder operation. The 2-to-4-line decoder has the following truth table –

Truth Table of 2 to 4 Line Decoder

Fig. 13: Truth Table of 2 to 4 Line Decoder

The decoder circuit can be constructed using NOT gates and AND gates. Here, for constructing the 2-to-4-line decoder 7404 IC for NOT gate, 7411 IC for AND gate are used. Since there is enable input as well, 3-input AND gates are used.

Testing the circuits –

The circuits designed above can be tested by giving supply voltage to the ICs by a battery via 7805 voltage regulator. The same voltage can be dropped to 2V level using a variable resistor for HIGH logic while providing LOW logic through ground. The output signals can be checked by connecting LEDs at the output pins of each combinational circuit. The circuits can be checked by verifying truth tables for each circuit.

In the next tutorial, learn to construct multiplexer and demultiplexer circuits.

Circuit Diagrams

Circuit-Diagram-2-to-4-Line-Decoder
Circuit-Diagram-4-to-2-Line-Encoder


Filed Under: Digital Electronics, Tutorials

 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: Internet of Things
Explore practical strategies for minimizing attack surfaces, managing memory efficiently, and securing firmware. Download now to ensure your IoT implementations remain secure, efficient, and future-ready.

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions

  • Lightbox circuit help
  • Input impedance matching network
  • Unity Gain Buffer with 0 to 0.5V Range
  • LVS Mismatch Error in Simple Layout
  • Is it possible to improve accuarcy of ad633

RSS Electro-Tech-Online.com Discussions

  • how to make bihar airport
  • Trail camera
  • how to work on pcbs that are thick
  • can a AT89C51 be used as a rom?
  • how to use crystal

Featured – Designing of Audio Amplifiers part 9 series

  • Basics of Audio Amplifier – 1/9
  • Designing 250 Milli Watt Audio Power Amplifier – 2/9
  • Designing 1 Watt Audio Power Amplifier – 3/9
  • Designing a Bass Boost Amplifier – 4/9
  • Designing a 6 Watt Car Audio Amplifier – 5/9
  • Design a low power amplifier for headphones- 6/9

Recent Articles

  • ITG Electronics releases gate drive transformers with 200 – 450 V DC capability
  • Stackpole introduces HCJ jumpers with 70.7 amp continuous current capability
  • Infineon releases MCU with 128K flash and multi-sense capabilities
  • ST introduces 600V GaN gate drivers with 300 ns start-up time
  • ABLIC releases S-19116 automotive voltage detector with 6.8μs response time

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronics Projects and Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe