So...
(it takes 16 inputs, its insane)
Codes:
All 16 off = all off
1st input on = 2nd output on
2nd input on = 1st output on
3rd input on = 3rd output on
4th input on = 4th output on
5th input on = 1st output on
6th input on = 1st + 2nd output on
7th input on = 1st + 2nd output on
8th input on = 4th output on
finishing rest later