Suppose I have a black box with 3 inputs (each input is 1 bit) and 2 bits output. The black box counts the amount of turned on input bits. Using only such black boxes,one needs to implement the counter of turned on bits in the input,which has 7 bits.The implementation should use the minimum possible amount of black boxes.
//This is a job interview question