This page is the exhaustive drill room for Encoders and priority encoders. The parent note gave you the equations. Here we hunt down every kind of input pattern those equations can ever see, and we work each one to death — so that on an exam or a real chip, no case surprises you.
Before we start, let me re-anchor every symbol so this page stands alone.
Here is every class of situation a 4-input priority encoder can be handed. If we work one example from each row, we have literally covered all 24=16 input patterns' worth of behaviour, because every pattern falls into exactly one of these classes.
#
Case class
What makes it special
Covered by
A
Single input, low index (I0)
the "index 0" trap — needs V to be meaningful
Example 1
B
Single input, high index (I3)
the winner is also the highest — no suppression
Example 2
C
Two inputs, no conflict on bits
multiple on, but the higher one's code is clean
Example 3
D
Two inputs, suppression fires (I1 & I2)
the I2 term must kill I1
Example 4
E
All four inputs HIGH
maximum contention — top dog I3 must win alone
Example 5
F
Zero / degenerate — nothing on
ambiguity with I0; V saves us
Example 6
G
Real-world word problem
interrupt lines firing together
Example 7
H
Exam-style twist — plain vs priority
same input, two devices, different answers
Example 8
Figure 1 shows the whole priority-encoder as a little "tournament bracket" so you can see what "highest index wins" means.
Look at the bracket: each input enters at the bottom, and whenever a higher-numbered input is on, it eats the lower ones on its way up. Only the survivor's index reaches the output.
Figure 3: the yellow bar (plain) jumps to 3 for the two-input case, while the green bar (priority) correctly caps at 2. The gap between them is the suppression term.
A → Ex 1 · B → Ex 2 · C → Ex 3 · D → Ex 4 · E → Ex 5 · F → Ex 6 · G → Ex 7 · H → Ex 8. Every class covered. ::: Yes — all 8 rows, spanning single/multiple/all/none inputs plus a word problem and an exam contrast.
Quick self-test:
Two inputs I1=1,I3=1 into the priority encoder — output?
Y1=1,Y0=1⇒11=3 (Case C logic: I3 outranks I1).
All zeros — what tells you the 00 is meaningless?
The valid bit V=0 (Case F).
Which single example proves the I2 term is necessary?
Example 4 (I2 and I1 both on) — without it Y0 would wrongly be 1.