chess:programming:bit_operations
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
chess:programming:bit_operations [2021/11/05 09:51] – peter | chess:programming:bit_operations [2021/11/05 09:55] (current) – peter | ||
---|---|---|---|
Line 28: | Line 28: | ||
Apply an odd mask against it: | Apply an odd mask against it: | ||
+ | < | ||
00101101011001010111000110001001 | 00101101011001010111000110001001 | ||
01010101010101010101010101010101 | 01010101010101010101010101010101 | ||
———————————————————————————————— | ———————————————————————————————— | ||
00000000000101000100000101000100 | 00000000000101000100000101000100 | ||
+ | </ | ||
<WRAP info> | <WRAP info> | ||
**NOTE: | **NOTE: | ||
- | * 0xAAAAAAAA | + | |
- | * 0x55555555 | + | * Its bitwise AND with a number will separate out the even bits. |
+ | * 1010 1010 1010 1010 1010 1010 1010 1010 | ||
+ | |||
+ | | ||
+ | * Its bitwise AND with a number will separate out the odd bits. | ||
+ | * 1010 1010 1010 1010 1010 1010 1010 1010 | ||
</ | </ |
chess/programming/bit_operations.1636105916.txt.gz · Last modified: 2021/11/05 09:51 by peter