bit manipulation - How can I set all bits to '1' in a binary number of an unknown size? -
I am trying to write a function in the assembly (but the language gives an agnostic value for the question).
How can I set up all the bits I have used in Betul operators?
I know that I can experiment with a mask with bits "or" bits I want to set I, but I do not know that the mask based on a binary number of some size How to construct
~ (x & amp; 0)
X & amp; 0 will always result in 0, and ~ will flip all the bits in 1s.
Comments
Post a Comment