I was wondering if there was some specific method to finding the circuit for an xor with a variety of variables. Like, I can easily expand a set number of xor(2 inputs) and xor(3 inputs) but there has to be some way to minimize the number you use. So, say XOR of 17 variables, how would you minimally expand it, using the least number of and/or gates?
Thank you
Best Answer
simulate this circuit – Schematic created using CircuitLab
This is a popular circuit to implement the XOR gate with minimal number of basic universal gates.
Take two inputs at a time and implement many such circuits, then take their outputs and send them into the same XOR circuit two at a time. Something like the draw of a knockout style tournament. Your final output will be the XOR of all your inputs.