make inputs word-sized for efficient bitops
use some bitops ffs

Well, __ffs actually.  Still, almost as fun as that time I got to
include <ftw.h>...