Ok so I re-worded this kind of in my head to make more sense of this: I’m looking to create logical expressions for which I can use to tell whether I have 0,1,2, or 3 inputs out of 3 be true.
0 and 3 were easy.
For 0 you can use an “or” or “nor” gate. If OR outputs false, all the inputs are false. If NOR outputs true all inputs are false. Regardless you can judge that all three inputs were false.
For 3 you can use an “and” or “nand” gate. If and outputs true, that means all the inputs were true. If nand outputs false that means no input was false, they were all true. Regardless you can judge that all three inputs were true.
For 1 and 2 I came up with these expressions:
One Input:
(x∧~y∧~z)∨(~x∧y∧~z)∨(~x∧~y∧z)
Two Input:
(x∧y∧~z)∨(~x∧y∧z)∨(x∧~y∧z)
When it came out to trying different ideas for the three input ones I got tired of making truth tables and looked up for a program that makes the tables for me. It doesn’t solve anything. It just creates the tables based on my input. If this is an issue I’ll stop using it. This is the website: https://truth-table.com/