n = 16 - __builtin_clz (x);
n = (sizeof (int) * 8) - __builtin_clz (x);
Stupid me! I forgot to say that I'm looking for a hardware solution. Best without any clock cycles.... and thanks for the help so far!
My sense is for a lot of the computers that have a count leading zeros instruction
If all you have is the 16 ring counter inputs, you can use a pair of 74LS348 priority Encoders.
or one 74LS150...
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16