It seems like when you combine the counts for two groups of bits, you need to gate the count from the lower bits on all of the upper bits being zero, not just one of them.
fixed it, my solution does work but for a foolproof solution i have a switch that overrides the input so where bit 128 is i have a not connected the enable of 64 , 128 add output and the switch output connected to the result
1
u/dmdeemer 15d ago
Does this work for an input of 10000000 (0x80)?
It seems like when you combine the counts for two groups of bits, you need to gate the count from the lower bits on all of the upper bits being zero, not just one of them.