I have a circuit where I have 9 outputs from comparators (logic 1 or 0) and would like each of the nine outputs to be the corresponding 4 bit binary number. This binary number would be sent to a 4511 7 segment display decoder/driver to display the corresponding decimal number (1-9) on a 7 segment display. The outputs of the comparators are fault indications for heater circuits. If a logic 1 is seen from the fault indication (say heater circuit 5) I need the 7 segment LED to display 5. The problem is I don't know how to convert each individual bit from the comparator to the corresponding 4 bit binary number and move this to the 4511. I tried having each comparator output going to the control of a 4066 quad analog switch. For example, if comparator 3 went to a logic level 1, then this would turn on switches 1 and 2, while switches 3 and 4 stayed off. Thus I would get a binary 0011 to send to the 4511. The problem with this is that you need tons of diode to block and direct the paths to the 4066. All nine comparators tied to the corresponding switches. There's gotta be a better way! Any ideas to get me pointed in the right direction?