Linux ffs 命令

来源:互联网 发布:云南农业大学网络党校 编辑:程序博客网 时间:2024/06/04 18:29

NAME

ffs - find first bit set in a word 

SYNOPSIS

#include <strings.h>int ffs(int i);
 

DESCRIPTION

The ffs() function returns the position of the first bit set inthe wordi. The least significant bit is position 1 and themost significant position e.g. 32 or 64. 
bit0为1返回1,最高位为1返回32或64。 

RETURN VALUE

The ffs() function returns the position of the first bit set,or 0 if no bits are set.