ffs_s

Computes the number of left shifts required to normalize a 16-bit value, returning a 16-bit result (finds 1st sign bit). Returns a shift count of 31 for an input of 0x0000.

Note: Does not actually normalize the value! Also see the intrinsic norm_s which handles the case where the input == 0x0000 differently.
Prototype
  Word16 ffs_s(Word16 ssrc)
Example
short s1 = 0x2000;/* .25 */

short result;



result = ffs_s(s1);

// Expected value of result: 1