Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key 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
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering

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

By Hai Prasaath K

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: Electronic Projects

 

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



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

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!


Featured Tutorials

  • Introduction to Brain Waves & its Types (Part 1/13)
  • Understanding NeuroSky EEG Chip in Detail (Part 2/13)
  • Performing Experiments with Brainwaves (Part 3/13)
  • Amplification of EEG Signal and Interfacing with Arduino (Part 4/13)
  • Controlling Led brightness using Meditation and attention level (Part 5/13)
  • Control Motor’s Speed using Meditation and Attention Level of Brain (Part 6/13)

Stay Up To Date

Newsletter Signup

Sign up and receive our weekly newsletter for latest Tech articles, Electronics Projects, Tutorial series and other insightful tech content.

EE Training Center Classrooms

EE Classrooms

Recent Articles

  • What are the battery-selection criteria for low-power design?
  • Key factors to optimize power consumption in an embedded device
  • EdgeLock A5000 Secure Authenticator
  • How to interface a DS18B20 temperature sensor with MicroPython’s Onewire driver
  • Introduction to Brain Waves & its Types (Part 1/13)

Most Popular

5G 555 timer circuit 8051 ai Arduino atmega16 automotive avr bluetooth dc motor display Electronic Part Electronic Parts Fujitsu ic infineontechnologies integratedcircuit Intel IoT ir lcd led maximintegratedproducts microchip microchiptechnology Microchip Technology microcontroller microcontrollers mosfet motor powermanagement Raspberry Pi remote renesaselectronics renesaselectronicscorporation Research samsung semiconductor sensor software STMicroelectronics switch Technology vishayintertechnology wireless

RSS EDABOARD.com Discussions

  • simple LSB explanation please
  • Timer MC14541B wrong delay
  • Measure AC current accurateley (100mA to 10A)
  • Avalanche Pulser
  • FPGA Interfacing with ADC AD7606

RSS Electro-Tech-Online.com Discussions

  • bluetooth jammer
  • Disabled son needs advice please
  • DIY bluetooth speaker
  • Someone please explain how this BMS board is supposed to work?
  • HV Diodes
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • About Us
  • Contact Us
  • Advertise

Copyright © 2022 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 | Advertising | About Us

Search Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key 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
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering