Is there any sence in performing binary AND with a number where all bits are set to 1

Posted by n535 on Stack Overflow See other posts from Stack Overflow or by n535
Published on 2010-03-27T12:38:03Z Indexed on 2010/03/27 12:43 UTC
Read the original article Hit count: 320

Filed under:
|

Greetings everybody. I have seen examples of such operations for so many times that i began to think that i am getting something wrong with binary arithmetics. Is there any sense to perform the following:

byte value = someAnotherByteValue & 0xFF;

I don't really understand this, because it does not change anything anyway. Thanks for help.

P.S. I was trying to search for information both elsewhere and here, but unsuccessfully.

© Stack Overflow or respective owner

Related posts about binary

Related posts about math