    

 ## On this page

  

 

 # PutBits

 Last update: 16.07.2025 

Returns the input with a number of bits of the pattern copied at the given position.

## Interface

NameKindTypeCommentNPN/ASize of the bit-fieldbfIunsigned&lt;&lt;N&gt;&gt;Input bit-fieldpIintegerStart bit position  
Range: \[0, N\[lIintegerNumber of bits to set  
Range: \[0, N-p\[patternIunsigned&lt;&lt;N&gt;&gt;Pattern to be setvOunsigned&lt;&lt;N&gt;&gt;Result of the operation**Parent topic:**[Bitfield](./bitfield.md)