Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
08/25/12 21:18
Read: 674 times

#188170 - Pesrpective...
Responding to: Per Westermark's previous message
Per Westermark said:
~0x7f is inverting all bits.
In short - going that extra route with ~ to invert the bits, you make sure that the & operation will handle whatever number of bits that the register happens to be wide.

Never thought in those lines. Thanks for the insight, Per.

List of 6 messages in thread
A simple doubt in C      Raghunathan      08/25/12 09:58      
   Clears 7 low bits but protects unknown # of high bits        Per Westermark      08/25/12 11:04      
      Pesrpective...      Raghunathan      08/25/12 21:18      
   Setting & clearing bits        Andy Neil      08/25/12 11:18      
      Concept is very clear now...      Raghunathan      08/25/12 21:08      
         Practical C Programming      Andy Peters      09/04/12 15:57      

Back to Subject List