Combination of logic gates outputting single value (either 1 or 0)

205 Views Asked by At

Here is my naive question, I would like to build s system of logic gates (not, &, or, nand, ...) where on input side I have all combination of {0,1} minimum input 4 values ($2^4$ combinations)

0000 -G-> 1

0001 -G-> 1

..

..

1111 -G-> 1

and on the output side I have just value 1 (or just value 0). I'm probably overlooking some simple solution. If it is possible, please write down the example if not, sketch of the proof would be great. Thanks a lot

2

There are 2 best solutions below

2
On

Do it like this for one bit.

A OR (NOT A)

This will always be true and will produce a 1 at the end.

A AND (NOT A)

will always be false, thus producing a 0.

0
On

If you want a set of gates to fulfill any combination of input/output combinations, you should use the Disjunctive normal form. There are some algorithms to give you the normal form from the original set of input/output combinations.