The Basics
Some of us need to find out how many leading zero-bits there are in a 32-bit word. Such a feature is useful on many occasions, especially when writing a fast divide subroutine.
The Cortex-M3 and later have a CLZ instruction which can count…