[sdiy] an XOR question

Scott Gravenhorst music.maker at gte.net
Sun Sep 12 01:28:49 CEST 2004


"Schierl, Dan" <schierld at msoe.edu> wrote:
>This is a multi-part message in MIME format.
>
>	charset="iso-8859-1"
>Content-Transfer-Encoding: quoted-printable
>
>Hi list--
>I have an application I'm working on in which I need to perform an =
>exclusive OR on 4 inputs. Since I don't think anyone makes a 4-input =
>XOR, I tried to rig something up using some CMOS chips. My first attempt =
>was a little too simplistic (i.e. wrong), which I didn't realize until =
>I'd already wired it into my application. I think my second attempt =
>works (haven't tried it yet, tho) but i think it might be overkill.=20
>=20
>Go here: http://people.msoe.edu/~schierld/temp/xor.html to see my two =
>ideas.
>=20
>My question is: the second idea is pretty much a literal definition of =
>an XOR gate, 
>but I wonder if there are any trick ways to make one of =
>these with fewer chips. Any thoughts you might have would be =
>appreciated. thanks!

The schematic with 3 XOR gates is called a "parity tree" and it is used to
generate a parity bit for detecting single bit errors in a group of bits. 
This configuration is also used to form the feedback bit of an LFSR
pseudorandom noise generator.  Basically a parity tree calculates to a logical
high if an odd number of inputs are high (I think this applies for an even
number of total inputs).  So if you need to know if only one input of a set is
high, then a parity tree will not work.  Other than banging it out the way you
did (and I haven't analyzed it for it's correctness), there may be other
approaches in programmable logic devices that could work.  One EASY way would
be to use an EPROM - you input the 4 bits into the address lines and then pick
the output off of one data output - it's a one IC solution.




---------------------------------------------------------
- Where merit is not rewarded, excellence fades.
- Hydrogen is pointless without solar.
- What good are laws that only lawyers understand?
- The media's credibility should always be questioned.
- The only good terrorist is a dead terrorist.
- Governments do nothing well, save collect taxes.

-- Scott Gravenhorst | LegoManiac / Lego Trains / RIS 1.5
-- Linux Rex         | RedWebMail by RedStarWare
-- FatMan: home1.gte.net/res0658s/FatMan/
-- NonFatMan: home1.gte.net/res0658s/electronics/
-- Autodidactic Master of Arcane and Hidden Knowledge.




More information about the Synth-diy mailing list