For boolean expressions, bitwise ~ and logical NOT are generally the same, but in SqlServer the first can be applied on BITs, while the second one is for boolean predicates.
Since #34080 the SqlServer provider avoids converting to a predicate when it just needs to negate a BIT, but it does so using ^ 1.
A better translation could be emitted by translating to a ~.
For boolean expressions, bitwise
~and logicalNOTare generally the same, but in SqlServer the first can be applied onBITs, while the second one is for boolean predicates.Since #34080 the SqlServer provider avoids converting to a predicate when it just needs to negate a
BIT, but it does so using^ 1.A better translation could be emitted by translating to a
~.