ScholarQuill logoScholarQuillUniversity Notes
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
Study Tools
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
Contact
ScholarQuill logo
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
ScholarQuill logoScholarQuillUniversity Notes
Study PortalPHYS4129Encoder Decoder
Ctrl + K
Login
Explore
Search
Semester
Papers
CGPA
    PHYS4129

    Digital Logic and Design

    Progress0 / 20 done
    Topics20
    1Binary, octal and hexadecimal number system their inter conversion2Basic logic gates
    3BCD, ASCII, Gray etc.4Parity in codes
    5Demorgan theorems6Simplification of Boolean expression by Boolean postulates and theorem7SOP and POS conversions8K maps and their uses9Don't care condition
    10Logic circuits based on AND-OR, OR-AND, NAND, NOR Logic gates design11Addition, subtraction, 2's compliments12Half adder, full adder13Half subtractor, full subtractor14Encoder, decoder15Multiplexer and demultiplexer
    16Latches
    17S-R, J-K, T and D flip flops18Master-slave flip-flops
    19Basic characteristics (Propagation delay time, dissipation, noise margins etc.)
    20DTL, RTL, TTL, CMOS
    5 min read
    Topic 14 of 20
    Topic Study Note Illustration
    14

    Encoder, decoder

    In digital systems, encoders and decoders are essential components used for converting data between different formats, particularly in communication systems, data processing, and memory addressing. These components...

    Encoder and Decoder

    In digital systems, encoders and decoders are essential components used for converting data between different formats, particularly in communication systems, data processing, and memory addressing. These components are primarily used to convert information from one format to another in a way that reduces redundancy and increases efficiency. Let’s explore encoders and decoders in detail.


    1. Encoder

    An encoder is a combinational circuit that converts n input lines into a smaller number of output lines, effectively reducing the number of bits required to represent the information. Encoders are used to encode data into a more compact form.

    Types of Encoders:

    • Binary Encoder
    • Priority Encoder

    Binary Encoder:

    A binary encoder converts n input lines into log2(n) output lines. For example, an 8-input encoder will produce a 3-bit output, as 3 bits are required to represent 8 possible states (2³ = 8).

    Truth Table for 4-to-2 Binary Encoder:

    Input A3 Input A2 Input A1 Input A0 Output Y1 Output Y0
    0 0 0 0 0 0
    0 0 0 1 0 1
    0 0 1 0 1 0
    0 0 1 1 1 1
    0 1 0 0 1 0
    0 1 0 1 1 1
    1 0 0 0 1 0
    1 0 0 1 1 1
    • Inputs A3, A2, A1, A0: Four input lines.
    • Outputs Y1, Y0: Two output lines representing the binary equivalent of the active input.

    The output produces a binary number corresponding to the active input, where only one input is active at a time. This simplifies multiple input values into fewer output bits.

    Priority Encoder:

    A priority encoder is similar to a binary encoder but with an important difference: it has a priority rule, where if multiple inputs are active at the same time, the highest-priority input is considered. It also typically generates an output for validity (often referred to as "V").

    Truth Table for 4-to-2 Priority Encoder:

    Input I3 Input I2 Input I1 Input I0 Output Y1 Output Y0 Valid (V)
    0 0 0 0 0 0 0
    0 0 0 1 0 1 1
    0 0 1 0 1 0 1
    0 0 1 1 1 1 1
    0 1 0 0 1 0 1
    0 1 0 1 1 1 1
    1 0 0 0 1 0 1
    1 0 0 1 1 1 1
    • Inputs I3, I2, I1, I0: Four input lines.
    • Outputs Y1, Y0: Two output lines representing the binary number corresponding to the highest active input.
    • Valid (V): This output indicates whether any input is active.

    The priority encoder always considers the highest active input, providing the binary code for that input and a valid output indicating that an active input is present.


    2. Decoder

    A decoder is a combinational circuit that takes an n-bit binary input and converts it into one of 2ⁿ possible output lines. In essence, decoders are used to select a particular output line based on a binary input.

    Types of Decoders:

    • Binary Decoder
    • Priority Decoder

    Binary Decoder:

    Binary decoder
    Visual ReferenceBinary Decoder
    Wikipedia

    A binary decoder converts n input bits into 2ⁿ output lines. For example, a 3-to-8 decoder has 3 inputs and 8 outputs, and only one output is active at a time based on the binary value of the inputs.

    Truth Table for 3-to-8 Binary Decoder:

    Input A2 Input A1 Input A0 Output Y7 Output Y6 Output Y5 Output Y4 Output Y3 Output Y2 Output Y1 Output Y0
    0 0 0 1 0 0 0 0 0 0 0
    0 0 1 0 1 0 0 0 0 0 0
    0 1 0 0 0 1 0 0 0 0 0
    0 1 1 0 0 0 1 0 0 0 0
    1 0 0 0 0 0 0 1 0 0 0
    1 0 1 0 0 0 0 0 1 0 0
    1 1 0 0 0 0 0 0 0 1 0
    1 1 1 0 0 0 0 0 0 0 1
    • Inputs A2, A1, A0: Three input lines.
    • Outputs Y7, Y6, ..., Y0: Eight output lines corresponding to the 8 possible combinations of the input bits.

    The output that is active (1) depends on the value of the input binary number. Only one output line is active at a time.

    Priority Decoder:

    A priority decoder is similar to a binary decoder, but it has a priority rule for handling multiple active inputs. The highest-priority input is decoded first, and it generates an output corresponding to the highest active input.


    3. Applications of Encoders and Decoders

    • Encoders:

      • Data compression: Reducing the number of bits used to represent data.
      • Keypad encoding: In a keypad, pressing a key generates a binary code which is then encoded by the encoder circuit.
      • Multiplexing: Selects one of several inputs to send to an output based on encoded control signals.
    • Decoders:

      • Memory addressing: Decoding the memory address from the CPU to access specific locations in memory.
      • 7-segment displays: Decoding binary input to control the segments of a display.
      • Instruction decoding: In CPUs, decoding the operation code (opcode) to execute specific instructions.

    Conclusion

    • Encoder: Converts multiple input lines into fewer output lines. It's used for compactly representing multiple data states in a smaller bit-width.
    • Decoder: Converts binary input into a large number of output lines. It's used to activate specific lines based on the binary input.

    Both encoders and decoders are fundamental in digital systems, data communication, and logic design for performing efficient data representation and processing.

    ← Previous topic 13
    Half subtractor, full subtractor
    Next topic 15 →
    Multiplexer and demultiplexer

    Past Papers

    Open this section to view and download past papers

    Click on Show Past Papers to load available exam papers.

    Reading Progress
    0%
    5mremaining
    919words
    Intermediatelevel
    On This Page

    No headings found

    Study Toolkit

    Subject Portal

    Digital Logic and Design