Minority Detector (4-input)

Output 1 when the ones are in the minority among four inputs, i.e. when at most one of the four input bits is 1. Two or more ones (including a 2-2 tie) gives 0. Input: in, 4 bits. Output: y. The testbench applies all 16 inputs.

Compiler Output
Waveform Viewer