Logical operators are quite simple, since they can only produce two outputs: true or false. The basic logical (Boolean) operators are AND (&&), OR (||), XOR (also called “Exclusive OR”, ^) and NOT (or negation, !).
I will show you a sample of the four logical operations and the results that they produce: