Minecraft redstone logic - comparing 6 inputs

i do have 6 inputs. 3 A inputs, 3 B inputs. Each one of them can be set to on or off. I now have to compare those 6 and look who has more on-inputs. A or B?

Does anyone have a solution for this?

What i've tried so far:

• For each A and B, make a dropper counter, that stores up to 3 items. Everytime one A input gets on, it puts one item in the "on" Dropper, whereas when one A-input goes off, it takes it again. After that i have 2 Droppercounters to compare with Comparators. Problem: Goes far to big for my survival map. Don't like that solution.

• I thought of something like this - haven't tried it actually. Make a 15 signal strength input and feed it to a comparator set to subtraction mode. Now feed all the 3 A inputs into this main line and subtract their power. We get an output ranging from 12 to 15 (12 meaning A has 3 inputs on, 15 meaning A has 0 inputs on).

• Looked up all the logic gates. There might be one for comparing 6 inputs etc. Haven't found one.

What are your solutions for this one? I am trying to make the redstone simple and small!

Thanks!

• Ooh, this does look fun. – Studoku Apr 17 '14 at 11:42
• If you are interested in a logic-circuit solution you can write a truth table (six inputs, one function value) which you could you use to derive a logic formula which only uses the logic operators you would like to use. Use can combine logic gates with two inputs to make a more complex logic circuit. – Viktor Seifert Apr 17 '14 at 11:54
• @ Viktor Seifert: The problem is that all the minecraft logic gates i see have 2 outputs. On and off. I need 3. 1: A has more inputs on than b, 2: B has more inputs on than A, 3: Both has the same number of inputs on. Therefore i can't really combine the normal logic gates... So in general: i have 6 inputs and 3 outputs. – Shiuyin Apr 17 '14 at 11:57
• @ Viktor Seifert: That would be helpful. It took me 30minutes today to build my Droppercounter solution in creative, as mentioned above. And i don't really like that solution. There has to be a better way! – Shiuyin Apr 17 '14 at 12:03
• Using the truth table approach is impractical at best. There are 2^6 = 64 different input combinations. One important question I have is what if both A and B have the same number of inputs on? What if they're all off? – MBraedley Apr 17 '14 at 13:12