Connect with us

using decoder to receive a function with 1 out

Discussion in 'Electronic Basics' started by [email protected], Dec 28, 2005.

Scroll to continue with content
  1. Guest

    Hi peaple,

    I have a logic function:
    F(A,B,C) = A XOR C

    How can I implement it using 2-to-4-line Decoder (74LS156) and NAND
    gate ?

    Thank you in advance.
  2. PeteS

    PeteS Guest

    Without doing your homework for you, I'll give you a couple of

    1. Write the truth table for A XOR C (If you can't do that, you're
    going to fail)

    2. The '156 is a dual 2-4 line decoder (The On Semi datasheet states
    Datasheet at:
    Take A and C to the inputs of each decoder and figure out which outputs
    become valid for the truth table you constructed above.

    3. Use the NAND as an OR gate (which it is - low OR low = high - see
    DeMorgan's theorem) to get your final output.


  3. Guest

    Thanks PeteS,

    I've did it in such a manner but was not sure for 100% if it's correct.

    Best Regards.
  4. novice

    novice Guest

    even i have tried but to no avail. interesting problem???
  5. PeteS

    PeteS Guest

    This is a pretty simple assignment, and seeing as it's the season of
    goodwill, I'll help you out.

    Reading the datasheet
    "The LS155 and LS156 can be used to generate all four minterms of two
    variables. These four minterms are useful in some applications
    replacing multiple gate functions..."

    Generating a result for each minterm means each possible input
    combination is detected. (That's what a decoder does, after all).
    As each one is detected, it's pretty simple to get the equivalent of an
    XOR, but the decoder will have two outputs valid for the XOR function.
    (The XOR two-input truth table has two high outputs for the 4 possible
    input combinations. Note I am using 'positive logic' to say 'when the
    output is a logical 1, the input term is satisfied').

    One solution (There are more than one)

    Inputs A and C go to the A0 and A1 pins (which way around is irrelevant
    in this case)

    Enable decoder 'A', disable decoder 'B' (See the datasheet on how to do

    Take the #O1 and #O2 outputs to the inputs of a two input NAND. The
    output of the NAND will be high when the A0 and A1 inputs are different
    (one definition of an XOR). Now figure out why that is so. (#O1 means
    'Output 1, which is active when low').


  6. Guest

    PeteS ,

    I very appriciate your help. I found here two solutions.It was realy
    easy. The problem was that I started doing my homework at night.

    Thanks again.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day