    

 ## On this page

  

 

 # SetBitMask

 Last update: 09.03.2026 

Returns the input with the bits set to 1 as per the corresponding Mask bits when set to value 1 and the remaining bits will retain their original values. This is equivalent to the operator lor.

## Interface

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