logical operators:
The logical operators are as shown below:
All the logical operators operate on Boolean or logical operands. The not operator is a unary operator; while the others are binary. The not operator will acquire a Boolean expression, that is theoretically true or false, and give the contrary value. For illustration, (3 < 5) is theoretically false as (3 < 5) is true. The 'or' operator has two Boolean expressions as the operands. The answer is true if either or both of the operands are true, and false only if both the operands are false. Also the 'and' operator operates on two Boolean operands. The answer of an Now Comparing the characters, for illustration 'a' < 'c', is also possible. The Characters are compared by using their ASCII equal values. Therefore, 'a' < 'c ' is theoretically a true expression, as the character 'a' comes before the character 'c'.
>> 'a' < 'c'
ans =
1and expression is true only if both the operands are true; it is false if either or both are false.