Changes

Jump to: navigation, search

General Setwise Operations

374 bytes added, 11:12, 28 June 2020
no edit summary
</pre>
'''Reset''' <br/>
<span id="ResetBit"></span>Reset a bit of square-index by [[General Setwise Operations#RelativeComplement|relative complement]] of the single bit.,
<pre>
x &= ~singleBitset; // reset bit
</pre>
or conditional toggle by single bit intersection
<pre>
x ^= singleBitset & x; // reset bit
</pre>
Set and toggle (or, xor) might the faster way to reset a bit inside a register (not, and).
* [http://www.talkchess.com/forum/viewtopic.php?t=47710 How to Shift Left (by) a Negative Number??] by [[Steve Maughan]], [[CCC]], April 05, 2013
* [http://www.open-chess.org/viewtopic.php?f=5&t=2878 To shift or not to shift] by thevinenator, [[Computer Chess Forums|OpenChess Forum]], September 09, 2015 » [[Space-Time Tradeoff]]
* [https://groups.google.com/d/msg/fishcooking/r_7TSUtNXls/PUM5JgcSFQAJ Question about resetting a bit in a bitboard corresponding to a given square] by guenther, [[Computer Chess Forums|FishCooking]], September 09, 2016 » [[#ResetBit|Reset Bit]]
* [https://groups.google.com/forum/#!topic/fishcooking/TplkvO62I9U On the speed of SquareBB array] by protonspring, [[Computer Chess Forums|FishCooking]], March 22, 2019

Navigation menu