Constructing an Encoder
The solution is found by searching for "encoder" on Wikipedia:



Key point, the only valid inputs are when exactly one of the inputs is high. That means there are lots of don't cares in the output columns of the truth table.