On 2017/10/08 11:30 PM, Keith Medcalf wrote:
If for example a = 0xA then !a might be 0x5 for a nibble, but it will be
0xF5 for a byte, 0xFFF5 for a WORD, 0xFFFFFF5 for a 32bit INT, etc. etc.
This is balderdash. There is no such thing as "meant", only "is". And you
last sentence is discussing the COMPLEMENT operator, not the NOT operator.
Cannot we please keep the discussion on topic?
The topic started as a request for an XOR operator. I've added a request
for a NOT operator. Both these are obviously possible by a little
work-around, as has been shown, but the single operator would still
be a nice-to-have.
I'm not sure I interpret correctly, but it seems to me you are saying
that the above description is of a COMPLEMENT operator rather than a NOT
operator, hence it is off-topic.
What would you call an operator that switches all bits in a byte? All
bits that were 0 become 1, and all that were 1 become 0. In my travels I
have come to know this as a NOT operation. If you call it COMPLEMENT
then good luck, but I don't see the relevance of re-issuing the name of
the concept and then calling it off-topic.
I have no interest in a contest of best-name-for-the-thing. Whatever you
would like to call an operation that switches all bits to the opposite
of what they were, that thing was the request. (I am no longer
requesting it btw., in fact the "balderdash" above was in reply to
another post, showing why it probably isn't feasible in SQLite, and this
reply is merely a clarification since a misunderstanding seemed afoot).
 - The signed value thing was discussed by Clemens, offering it as a
work-around to achieve not-ness while compensating for the sign inherent
to signed INTs (used in SQlite) - and it works fine.
sqlite-users mailing list