3
votes
3answers
6k views

Is there something special about the number 65535?

2¹⁶-1 & 2⁵ = 2⁵ (or? obviously ?) A developer asked me today what is bitwise 65535 & 32 i.e. 2¹⁶-1 & 2⁵ = ? I thought at first spontaneously 32 but it seemed to easy whereupon I thought ...
-3
votes
2answers
2k views

Flipping the desired bit of an integer number [duplicate]

Suppose you were given an integer number in decimal notation. This when represented in binary will be a series of 0's and 1's. This sequence varies in length with the magnitude of the number. Now ...