add makefile; add bit.c; add lib.h; minor signature change