Odd-Numbered Binary Inputs & XOR Gates

  • Thread starter Thread starter sos617@bham.a
  • Start date Start date
  • Tags Tags
    Binary
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 3K views
sos617@bham.a
Messages
1
Reaction score
0
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.
 
Engineering news on Phys.org
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.
 
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.

KM