    

 ## On this page

  

 

 # PutBit

 Last update: 17.07.2025 

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](../../libraries/bitfield/bitfield.md)