add bits function to util.c
Merge branch 'brownyoda' into cevans

Conflicts:
	util.c
	util.h