Why not use: x = !x;?

Whole processes can be represented as sets of go/no-go T/F bits suitable for switch-case packing as a state machine.

I use bits to hold button pin states over 4 ms time to debounce the button.

When using input or output shift registers as pin multipliers, it's bits time then too.