Because operator precedence.
Check the documentation for the operators in the language you're using to see their specific rules. But at least in every language I've used the and
operation takes precedence over the or
operation.
So this:
not false and true or not false and not true
Is the same as this:
(not false and true) or (not false and not true)
The not
operation has even higher precedence, so now it's the same as this:
((not false) and true) or ((not false) and (not true))
Which reduces to:
(true and true) or (true and false)
Which reduces to:
true or false
Which reduces to:
true
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…