Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

XOR Gates

  1. Feb 17, 2009 #1
    Hi i am a theoretical physicist and am trying to understand electronics. (not a very bright idea)
    basically my question is how can we use 2 input xor gates to give a high output when an odd number of bits are high in a four bit binary. also what would such a circuit look like.
  2. jcsd
  3. Feb 17, 2009 #2


    User Avatar
    Science Advisor
    Homework Helper

    Start with a piece of paper and work out which combinations of inputs you want the output on for.
    For simplicity consider the 4bits as two pairs of bits.
    Then you want an output when either there is only one of the first pair and none of the second or both of the second. (and vice versa)
    hint - if either both or none of a pair is on then an XOR would be false.

    You will probably also have to work out how to implement an AND (or NAND) from XOR.
  4. Feb 28, 2009 #3
    Or, you may simply route two lines to one XOR, and the other two to another XOR (it doesn't matter which lines), and then take the two XOR outputs to a third XOR.

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook