Will have added some links to the article

]]>Basically, these are the same as logical operations, but there are some additional rules.

Did you know that if A is positive, (so -A is negative), the rule “-A = not A + 1” applies? This also means that “-A = not (A – 1)”. There are more rules like that, e.g. “-A xor -B = not (A – 1) xor not (B – 1) = (A – 1) xor (B – 1)”, etc. This was a great help for my BigInteger implementation (https://github.com/rvelthuis/DelphiBigNumbers/blob/master/Source/Velthuis.BigIntegers.pas, see BigInteger.InternalBitwise).

]]>