The name of the logical operator A & (~ B)

Is there a name for logical AND with negation ( ~ ) of the second variable, that is:

 A & (~B) 

The truth table for such an operation:

 0 & (~0) = 0 0 & (~1) = 0 1 & (~0) = 1 1 & (~1) = 0 

And in longer bit sequences

 A = 10110011 B = 10111001 A & B = 10110001 A &(~B) = 00000010 

PS - I am also interested in OR with the negation of the second variable.

+7
source share
3 answers

Incredible. A and (~ B) is called Lack of material and A | (~ B) called Material Implication It seems that every possible binary operation has a name .

+5
source

The theoretical member of the set is a "relative complement" of B with respect to A.

+4
source

I like to call it more understandable. You will find it in the code also in the form using the destination:

A = A and ~ B

Or more compact like:

A & = ~ B

Example: Before: A = 0x0007, B = 0x0004 After: A = 0x0003

This means that it clears bits B of A. But a relative addition, and therefore a difference in names, you could write it like this: A \ B, like a lot of differences, is also a good name.

+1
source

All Articles