in the video at 09:10 we had a mask named b, i want to know that how do we calculate the numbers of 1’s required at last of mask b
Bit manipulation-clear
The question was to clear a range of bits from ith position to jth position.(from left to right as in video)
So to build a mask b, you need 1s till i-1th position. This mask will simply be 2^i-1
For more clarity i suggest you to watch the video again.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.