Question d’entretien chez Apple

Create a 4-to-2 priority encoder using only basic logic gates. Then use those encoders and MUXs to create a 16-to-4 encoder. Create a state machine to show if a binary number is divisible by five.