Hello,

I'm only using FA and simple gates (and, or, xor, not, etc). I'm given 6 bits as input, and I'm trying to count the 1 bits, I've done the following:

I use 2 FA as a filter, if they both carry out, I use another FA as a filter to see 2 or 4 is carried. With these 3 FA, I'll receive 4 outputs with the values of 1, 1, 2, and 4.

I can convey 0-6 bits used in 3 bits (000 - 110). What should I be looking at to assign those 4 outputs to the 3 bits? I feel like my mind is slipping and the solution should be relatively simple, but I get confused.

So many combinations seem possible, it seems a brute force method seems horrible. What should I be looking at?

Right now I'm pursuing adding both possible 1's in a FA to see if I have a 1 or 2. So now the potential output is 1, 2, 2, 4 (as opposed to 1,1,2,4) but this is still 4 outputs.

I'm only using FA and simple gates (and, or, xor, not, etc). I'm given 6 bits as input, and I'm trying to count the 1 bits, I've done the following:

I use 2 FA as a filter, if they both carry out, I use another FA as a filter to see 2 or 4 is carried. With these 3 FA, I'll receive 4 outputs with the values of 1, 1, 2, and 4.

I can convey 0-6 bits used in 3 bits (000 - 110). What should I be looking at to assign those 4 outputs to the 3 bits? I feel like my mind is slipping and the solution should be relatively simple, but I get confused.

So many combinations seem possible, it seems a brute force method seems horrible. What should I be looking at?

Right now I'm pursuing adding both possible 1's in a FA to see if I have a 1 or 2. So now the potential output is 1, 2, 2, 4 (as opposed to 1,1,2,4) but this is still 4 outputs.

Last edited: