set and clear bit functions. Fixed printBits funciton