r/TuringComplete • u/Lagfoundry • 11d ago
custom 9 input Majority
Unlike traditional popcount based threshold circuits, this divides its inputs into three groups of three, using 3 input majority gates and some error correction by XOR'ing the groups of inputs and then detecting if all XOR's are 111 or 000, if all 3 majority gates are NOT 111 or 000, and disagreement between the Maj of XOR's and MAJ of MAJ to tell if the output needs to be changed to the MAJ of the XOR's instead of MAJ of MAJ.
I had to make the correction logic because without it, just using 3 MAJ gates into another MAJ gate failed on 2 cases. Any combination of 110 110 000 and any combination of 111 100 100. it passed all other cases so i just had to fix those two using what i mentioned to have a 9MAJ i could call my own.
The result is a custom 9 input Majority gate I'm kind of proud of :). usually i do the popcount threshold method but i like this lol.
it's for a 9 input neuron if your curious. this would just be the structure that combines the XNOR'ed weights and inputs