DigiFlop

When more than one input is active, the highest-priority one wins.

Verilog Coding Exercise · Combinational II
8:3 Priority Encoder
When more than one input is active, the highest-priority one wins.

Like the plain encoder, but resolves ties: if multiple inputs are high at once, the output reflects whichever has the highest priority (here, the highest-indexed bit) — the real-world version used in interrupt controllers.

ApplicationsInterrupt controllers, keypad/keyboard scanning, bus arbitration logic.
▶ Try the interactive version