Bit manipulation functions: clear a bit, set a bit, flip a bit and test a bit