Digital Multiplexer and storing and comparing digital inputs

Thanks, Rob.

Next thing I need to know is how to compare each position in the array. Suppose I have an array of:

[0,1,0,1,0,1,1,1]

with the leftmost position being the first or lowest entry, and the rightmost position is the last or highest entry.

I need to select and compare the positions that has 0 binary value, so that I can transmit serially the highest position that has 0 binary value.

Using the array above as example, I need to select the positions that yielded 0 binary value, which are 000, 010 and 100. Then I need to compare them so that I can get the highest position, which is 100, and transmit it serially.

Thanks.