Simple bit manipulation library