New bit manipulation functions

Completed