Added helper functions for bitwise manipulation in integers.