Suppose you have a 0-1 string, e.g., 00001001001101
Is there any parallel circuit to find the largest power of 2 which is smaller than the number of 1s in the string?
Considering that I do not need the exact value of the number of 1s (I just want the largest power of 2 which is smaller than the number of 1s), the work and cost of the circuit is hoped to be smaller than an adder tree.
Is there any parallel circuit (preferably combinatorial circuit, as sequential circuit is too time-consuming when the string is very long) to accompolish this task ?
I know an adder tree can do this work.
However, an adder tree is too large and power-hungury for me.