Trouble understanding and, or, not statements


#1

I get the simpe ones, like True or True is always True. Can someone find a simple way to explain this to me?

I don’t understand the reason why the results are this way with these specific expressions:

True and False is False
False and True is False

True or False is True
False or True is True


#2

AND & OR are known as binary operators since they both take two operands.

A and B

A or B

The operands can be any expression.

a = 1
b = 2
c = 3

 a == 1 and b == 2  =>  True and True  =>  True

 a == 1 and b == 3  =>  True and False  =>  False

In an AND logical expression, both operands must be True or the result is False.

In an OR logical expression, either operand (or both) may be True for a result of True.

Consider the following truth tables…

AND   True  False
True    T     F
False   F     F

OR    True  False
True    T     T
False   T     F

#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.