To clear a particular bit, can’t we just perfrom bitwise XOR with mask?
Clear bit another approach
mask in this case will be (1 << i)
what if the ith bit is already zero? then instead of clearing it, it will set the bit
To clear a particular bit, can’t we just perfrom bitwise XOR with mask?
mask in this case will be (1 << i)
what if the ith bit is already zero? then instead of clearing it, it will set the bit