add bit twiddling fns