Encoder (4-to-2)
Use DigiSim's 4-to-2 Priority Encoder to encode the highest-numbered active input as a two-bit value. Input 3 has the highest priority.
Overview
The 4-to-2 Priority Encoder reports the index of the highest-numbered HIGH input. I3 has the highest priority and I0 the lowest.
Encoding Table
| Highest HIGH input | B A |
|---|---|
| none or I0 | 00 |
| I1 | 01 |
| I2 | 10 |
| I3 | 11 |
Multiple asserted inputs are valid; only the highest-numbered input determines the code. There is no valid output, so no active input and I0 alone cannot be distinguished from A and B.
Released inputs sample as LOW. A driven unknown produces X only on encoded bits that are not the
same for every possible completion.
Simulation Boundary
This is a fixed active-HIGH priority encoder, not a simple one-hot-only encoder or a physical interrupt controller.
Learning Path
Next Steps
Frequently Asked Questions
What is a priority encoder?
DigiSim outputs the index of the highest-numbered HIGH input. With no active input it outputs 00, the same code as input 0, because this component has no separate valid output.
Where are encoders used?
Interrupt priority systems, keyboard encoding, position detection, and converting one-hot representations to binary.