    

 ## On this page

  

 

 # PutBit

 Last update: 09.03.2026 

Returns the input with the bit set to 1 if status, otherwise 0, at the given position.

## Interface

NameKindTypeCommentNPN/ASize of the bit-fieldbfIunsigned&lt;&lt;N&gt;&gt;Input bit-fieldpIintegerBit position  
Range: \[0, N\[statusIboolSpecify whether the bit is to be set or clearedvOunsigned&lt;&lt;N&gt;&gt;Result of the operation**Parent topic:**[Bitfield](./bitfield.md)