will u please elbaorta it am unable to understand this
I did not understand update bit concept
these are the steps for updating a bit
p is postion at which bit is to be updated with b
We first create a mask that has set bit only
at given position using bit wise shift.
mask = 1 << position
Then to change value of bit to b, we first
make it 0 using below operation
value & ~mask
After changing it 0, we change it to b by
doing or of above expression with following
(b << p) & mask, i.e., we return
(n & ~mask) | (b << p)
from these steps first two are to cleared a bit and 3rd one is to set the bit with b
i hope this helps
if not you can ask again
i recommend you to watch video again at it is explained there clearly