Explanation & Logic Summary: The ~ operator is overloaded to invert all 8 bits of the internal uint8_t flag and return a new Flags object. The output explicitly displays both the original input value and its toggled counterpart.
Firmware Relevance & Real-World Context: Firmware frequently logs or debugs both the original register value and its modified version. Displaying input and toggled output together mirrors real-world diagnostics when manipulating control registers, GPIO masks, or peripheral configuration flags.