chess:programming:de_bruijn_sequence:8-bit_example
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
chess:programming:de_bruijn_sequence:8-bit_example [2021/11/30 00:49] – peter | chess:programming:de_bruijn_sequence:8-bit_example [2021/11/30 00:53] (current) – [Explaining the usage of this de Bruijn sequence] peter | ||
---|---|---|---|
Line 98: | Line 98: | ||
* It takes a number from 1 to 8 to lookup. | * It takes a number from 1 to 8 to lookup. | ||
- | * It multiplies this number by 0x1D, which is 29 Decimal. | + | * It multiplies this number by 0x1D, which is 29 Decimal. This is the Magic Number. |
* It right-shifts this by 5 to determine the specific bit position of that lookup value. | * It right-shifts this by 5 to determine the specific bit position of that lookup value. | ||
- | ^Lookup^* 29^>>5^ | + | ^Lookup^Lookup multiple by the magic number^Right-shifted by the offset^ |
+ | ^:::^(29 in this example)^(5 in this example)^ | ||
|1|29|0| | |1|29|0| | ||
|2|58|1| | |2|58|1| |
chess/programming/de_bruijn_sequence/8-bit_example.1638233393.txt.gz · Last modified: 2021/11/30 00:49 by peter