Quote:
Originally Posted by
acdc
I have a 32bit number and without using for loop, I want to set mbit to n bit.
...
I assume m<n.
I don't think anyone understood your question, since the suggestions proffered do not reflect what I consider to be the two likeliest interpretations.
Are you trying to set the value of the bit at index m equal to the value of the bit at index n? Or are you trying to set all bits from index m to index n to 1? Or something else entirely?
Why are you not able to use a for loop?
Regards,
Alister