How to set bits in a variable

Any good?