Can I simplify this circuit any further?

Thread Starter

Daniel Afonso

Joined Nov 23, 2017
My initial problem was: Return 1 if the number of logic 1's in a 7 bit number is multiple of 3.
Thanks to some older threads I managed to come up with a way to do it.
But now I not sure if I could simplify the circuit

In x[7];
Out fxe;
FullAdder(a=x[0], b=x[1], c=x[2], sum=sum0, car=car0);
FullAdder(a=x[3], b=x[4], c=x[5], sum=sum1, car=car1);
FullAdder(a=sum0, b=sum1, c=x[6], sum=sum2, car=car2);
FullAdder(a=car0, b=car1, c=car2, sum=sum3, car=car3);
Xor(a=sum2, b=car3, out=q0);
And(a=q0, b=sum3, out=fxe);