How can I copy several bits into a binary number or how can I reset some bits with one command ?

I can select a section from the number with original number & ~ (~0 << length of section )

Thanks
Tepy