It is not possible to have the address of a single bit, but you can use structures with bit fields. Like in this example from Wikipedia like this:
struct box_props { unsigned int opaque : 1; unsigned int fill_color : 3; unsigned int : 4;
Then, by manipulating individual fields, you change the sets of bits inside an unsigned int . Technically, this is identical to bitwise operations, but in this case, the compiler will generate code (and you have less chance of an error).
Keep in mind that you need to be careful when using bit fields.
source share