 The integer binary logarithm can be interpreted as the zero @-@ based index of the most significant 1 bit in the input . In this sense it is the complement of the find first set operation , which finds the index of the least significant 1 bit . Many hardware platforms include support for finding the number of leading zeros , or equivalent operations , which can be used to quickly find the binary logarithm . The fls and flsl functions in the Linux kernel and in some versions of the libc software library also compute the binary logarithm ( rounded up to an integer , plus one ) . 
