    

 ## On this page

  

 

 # ToggleBitMask

 Last update: 17.07.2025 

Returns the input with the bits toggled when the corresponding bit of the mask is 1 and the remaining bits will retain their original values. This is equivalent to the operator lxor.

## Interface

NameKindTypeCommentNPN/ASize of the bit-fieldbfIunsigned&lt;&lt;N&gt;&gt;Input bit-fieldmaskIunsigned&lt;&lt;N&gt;&gt;Mask used to toggle the bitsvOunsigned&lt;&lt;N&gt;&gt;Result of the operation**Parent topic:**[Bitfield](../../libraries/bitfield/bitfield.md)