Evaluation of the NOT operator

53 Views Asked by At

Suppose that we have three logical variables $X,Y$, and $Z$ such that

$$X=TRUE$$ $$Y=FALSE$$ $$Y=TRUE$$

Let the $NOT$ operator be represented as

$$.NOT.$$

and the $AND$ operator be represented as

$$.AND.$$

What would happen if we performed the $NOT$ operator on these three variables in the following manner

$$(X.NOT.Y).NOT.Z=X.NOT.(Y.NOT.Z)$$

According to this website, the operation would be associative from right to left. So, I think that this would evaluate as

$$!(X.AND.Y).NOT.Z=X.NOT.!(Y.AND.Z)$$

or

$$!(!(X.AND.Y).AND.Z)=!(!(Y.AND.Z).AND.X)$$

Therefore, with the $X,Y,Z$ as defined above,

$$!(TRUE.AND.Z)=!(TRUE.AND.X)$$

or

$$FALSE=FALSE$$

Is this the correct analysis of the $NOT$ operator (change $X.NOT.Y$ to $!(X.AND.Y))$?

1

There are 1 best solutions below

1
On BEST ANSWER

Taking into account your funny notation (which by the way you should have mentioned in your post), let X = TRUE, Y = TRUE, Z = FALSE: $$(X.NAND.Y).NAND.Z = FALSE.NAND.Z = TRUE \\\ne FALSE = X.NAND.TRUE = X.NAND.(Y.NAND.Z)$$

Also in the website you have linked to, $.NOT.$ is a unary operator, as it should be.