4-to-2 Encoder (without priority)

Design a 4-to-2 encoder that produces a 2-bit binary code corresponding to which input is high.

Contributed by Indicore

Compiler Output
Waveform Viewer