Way to count the number of high inputs with logic gates

adderbinarydigital-logicinputlogic-gates

I have \$2^n\$ inputs \$a_{0}, a_{1} .. a_{2^n}\$, these can be either hich or low, and \$n\$ outputs \$z_{0}, z_{1} .. z_{n}\$, these give out a binary number of how many of the inputs are high.
Is there any simple way to realize this without using half and/or full adders?

Best Answer

No. There isn't. If you want a binary number in which the nth output represents the place value of 2n, you have to cascade adders. Keep in mind though that an adder is just an AND gate for the carry bit, and an XOR gate for the sum bit.