Having Trouble Using Logic Gates

Discussion in 'Digital Circuit Design' started by Aaron Laurenciano, Mar 10, 2016.

  1. Aaron Laurenciano

    Thread Starter New Member

    Mar 10, 2016
    HOW can I make a logic "1" if two 4bit binary (0-9) inputs are the same and logic zero if not; with 8 switches connected to VCC. For example the 1st set of 4 switches are configured "1001" and the other is "0011" then it will have a logic "0"; and if the 1st set of switch are configured "1001" and the other set of switches are configured "1001" then it will have a logic "1".

    I attatched an image of my work (that obviously did not work) so might a little idea for you guys to help me. And if it is not possible with Logic Gates, what will?
  2. shteii01

    AAC Fanatic!

    Feb 19, 2010
    Truth table, where?
  3. Aaron Laurenciano

    Thread Starter New Member

    Mar 10, 2016
    I have no truth table, my friend and I are just changing the logic gates.
  4. crutschow


    Mar 14, 2008
    You can use a digital comparator such as the CD4063.
  5. RBR1317

    Active Member

    Nov 13, 2010
    The XNOR part is good; however, U5, U6, & U8 must be AND gates. Also, how did you ensure that when a switch is open there will be a logical zero signal applied to the gate inputs? Is this just a functional diagram, or is it an actual circuit schematic? Also, you should visually indicate which pairs of keys are intended to be compared.
    Last edited: Mar 11, 2016
  6. WBahn


    Mar 31, 2012
    In other words, you are hoping for a "happening", in which you make effectively random changes to your design hoping that, at some point, something will just "happen" to work.

    Would you like to discover that this is how your doctor diagnoses your health problems? Or how your mechanic fixes your car?

    If not, then you want to start learning how to DESIGN circuits, not just connect-and-pray.

    Think about the outputs of your XNOR gates. What does each one tell you if it is HI? What does each one tell you if it is LO?

    Now think about the output of one of the OR gates that follow a pair of XNOR gates. What does it tell you if it is HI? If it is LO? Are either one of these things particularly useful pieces of information given your objectives?

    What has to be true about that collection of those four outputs when the overall output of your circuit needs to be HI?