chess:programming:lsb_least_significant_bit
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
chess:programming:lsb_least_significant_bit [2021/10/30 11:57] – peter | chess:programming:lsb_least_significant_bit [2021/10/30 13:11] (current) – peter | ||
---|---|---|---|
Line 19: | Line 19: | ||
---- | ---- | ||
- | ===== Using bit-wise operations ===== | + | ===== Using Bit-wise operations ===== |
<code cpp> | <code cpp> | ||
Line 49: | Line 49: | ||
---- | ---- | ||
+ | |||
+ | ===== Using Builtin ===== | ||
+ | |||
+ | GCC has **< | ||
+ | |||
+ | <code cpp> | ||
+ | lsb = __builtin_clz(pos); | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | |||
===== Using de Bruijn ===== | ===== Using de Bruijn ===== | ||
Line 83: | Line 95: | ||
</ | </ | ||
- | |||
---- | ---- | ||
+ | |||
===== Using Logs ===== | ===== Using Logs ===== | ||
Line 176: | Line 188: | ||
===== References ===== | ===== References ===== | ||
- | |||
- | https:// | ||
http:// | http:// | ||
Line 184: | Line 194: | ||
https:// | https:// | ||
+ | |||
+ | https:// |
chess/programming/lsb_least_significant_bit.1635595046.txt.gz · Last modified: 2021/10/30 11:57 by peter