User Tools

Site Tools


chess:programming:bit_operations

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
chess:programming:bit_operations [2021/11/05 09:52] peterchess:programming:bit_operations [2021/11/05 09:55] (current) peter
Line 38: Line 38:
 **NOTE:**  Use Masks. **NOTE:**  Use Masks.
  
-  * 0xAAAAAAAA 1010 1010 1010 1010 1010 1010 1010 1010 +  * Mask **0xAAAAAAAA** has all its even bits set. 
-  * 0x55555555 = 0101 0101 0101 0101 0101 0101 0101 0101+    * Its bitwise AND with a number will separate out the even bits. 
 +    * 1010 1010 1010 1010 1010 1010 1010 1010 
 + 
 +  * Mask **0x55555555** has all its odd bits set. 
 +    * Its bitwise AND with a number will separate out the odd bits. 
 +    * 1010 1010 1010 1010 1010 1010 1010 1010
  
 </WRAP> </WRAP>
chess/programming/bit_operations.1636105935.txt.gz · Last modified: 2021/11/05 09:52 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki