Boolean Operation

MeaningBoolean operations are the different operations that are performed in Boolean algebra, to compare different values and return a true or false outcome.

The various operators that are used for boolean operations are – AND, OR, NOT, NAND, NOR, XOR. This is how the operations work –

  • x AND y – returns True if both x and y are true; returns False if either x or y are false.
  • x OR y – returns True if either x or y, or both x and y are true; returns False only if x and y are both false.
  • x XOR y – returns True if only x or y is true; returns False if x and y are both true or both false.
  • NOT x – returns True if x is false (or null); returns False if x is true.

Example of Usage “Boolean operations are the means to obtain true or false outcomes from the comparisons of various different values.”

We are powered by Cloudways Webhosting, try it on your website and upscale its performance