Contact FutureLearn for Support
Skip main navigation
We use cookies to give you a better experience, if that’s ok you can close this message and carry on browsing. For more info read our cookies policy.
We use cookies to give you a better experience. Carry on browsing if you're happy with this, or read our cookies policy for more information.

Skip to 0 minutes and 0 secondsLogical operators. Operators can act on sentences. When a logical operator acts on a sentence, or perhaps on a couple of sentences,

Skip to 0 minutes and 11 secondsthe result is always one of the following statements: The sentence is true, The sentence is false, or we don't know whether the sentence is true or false, we call this "unknown".

Skip to 0 minutes and 26 secondsLet's take a look at the binary logical operator: the word AND. It acts on two sentences.

Skip to 0 minutes and 35 secondsLet's take two sentences for an example: if both sentences are true then the result will be TRUE when we act with the operator on these sentences. Otherwise, the result is false. An example will make this very clear. Let's take one sentence which is

Skip to 0 minutes and 57 secondsa true sentence: "The sun can only shine in daytime".

Skip to 1 minute and 1 secondAnd let's take another sentence: "A cucumber is green". This is also a true sentence. Now, let's operate on the two sentences with the logical operator AND. The result is TRUE!

Skip to 1 minute and 16 secondsBecause the sentence: "The sun can only shine in daytime and a cucumber is green" is TRUE. It is made up of two true sentences.

Skip to 1 minute and 28 secondsHowever, if we take one sentence that is false, "The moon is always full", and another sentence:

Skip to 1 minute and 41 secondswhich is true, for example: "Stars are visible at night", and operate with the AND

Skip to 1 minute and 49 secondswe get the sentence: "The moon is always full and stars are visible at night". and this sentence, this whole sentence, which is made up of a true sentence and a false sentence is false according to the rules of the AND operator. Let's take a look at another logical operator. This time it is also a binary operator, It is the operator OR and it acts on two sentences but this time, if both sentences are false, the result is false, otherwise, the result is true, so we only really need one of the two sentences to be true so that the whole sentence

Skip to 2 minutes and 30 secondswill be true, for instance:

Skip to 2 minutes and 31 secondsLet's take a true sentence: "The sun can only shine in daytime", and another true sentence: "A cucumber is green".

Skip to 2 minutes and 37 secondsWhen we act with the OR operator we get the sentence: "The sun can only shine in daytime or a cucumber is green" and the result of acting with this operator on the two sentences is true because they are both true.

Skip to 2 minutes and 51 secondsHowever, if one is true: "The moon is... ....

Skip to 2 minutes and 56 secondswell, one is false: "The moon is always full" and one is true: "Stars are visible at night",

Skip to 3 minutes and 0 secondsthen, the whole sentence: "the moon is always full or stars are visible at night" is still true! even though, one part of this whole sentence is false, because, These are the rules of the OR opertor, it doesn't have to be logical or seem like it's funny! These are mathematical consequences of this logical operator. So the whole sentence is true.

Skip to 3 minutes and 28 secondsNow let's take two false sentences: "The moon is always full" "Cucumbers are fruits". Both sentences are false. In this case, and only in this case, if we act upon these two sentences with the OR operator,

Skip to 3 minutes and 40 secondswe get the sentence: "The moon is always full or cucumbers are fruits" and the result in this case only is false. because both sentences are false. Let's take a look at a unary logical operator, the NOT operator. It's also called 'negation' and because it's a unary operator, it acts on one sentence. If the sentence is true, the result is false, and if the sentence is false, the result is true, exactly the opposite. So, the negation or the NOT operator reverses the logical meaning of the sentence.

Skip to 4 minutes and 18 secondsIf we take a true sentence: " The sun can only shine during the day" and operate upon it with a NOT

Skip to 4 minutes and 25 secondsWe'll get a sentence: "The sun cannot only shine during the day" and this of course is false, because the sun, of course, cannot shine during the night. Now let's look at the opposite.

Skip to 4 minutes and 45 secondsThe false sentence: "The sun shines at night". The sun does not sun upon us at least at night... and we operator with the NOT operator

Skip to 4 minutes and 55 secondson this sentence, we get the sentence: "The sun does not shine at night" and this of course is a true sentence. And that's a bit about logical operators.

Logic operators

Logic is one of the most interesting branches of math. It is a very broad discipline of which we will learn only a small part here: matters of “true and false”.

Simple statements are facts that can be said to be either true or false. Note: questions, wishes or exclamations are not considered logical statements since they can’t be regarded as true or false (“Where is the school?” is not true nor false!).

An example of a true statement is: The sun shines during the day.
An example of a false statement is: The sun shines at night.

There are cases where it is impossible to determine if a statement is true or false:

  • This can happen if some details are missing, for example: My friend went to the movies last night.
  • The statement is semantically problematic, for example: I am lying. Is he telling the truth or lying?!

In addition to the concepts of true and false, logic also deals with negation. This concept may be explained by means of the following example: “It does not rain in November” is a statement that negates the statement “It rains in November”. The negation of a statement is false whenever the original statement is true, and vice versa.
This definition is also appropriate when we don’t know if the statement is true or false. If it is false, its negation is true, and vice versa.

The negation operation is an operator applied to a statement! There are other logic operators as well.

The operator and (conjunction): Suppose that a is one statement and b is another statement. Statement a and b is true when both a and b are true statements. In other words, when a statement is made up of two statements connected by the word and:

  • When both statements are true, the whole statement is true.
  • When at least one of the statements is false, the whole statement is false.

For example: If statement a is “There are clouds in the sky when it rains” (a true statement), and statement b is “Puddles are formed when it rains on the road” (a true statement), then the statement a and b: “There are clouds in the sky when it rains and puddles are formed when it rains on the road” is a true statement.

The operator or (disjunction): Suppose that a is one statement and b is another statement. Statement a or b is true when at least one of the two statements: a ,b, is true.

For example: If statement a is “There are clouds in the sky when it rains” (a true statement), and statement b is “A cat usually has three legs” (a false statement), then the statement a or b, “There are clouds in the sky when it rains or a cat usually has three legs” is a true statement.

Another example : Statement a: “Daniel went to school” (a true statement) Statement b: “Hannah went to school” (a true statement) “Daniel went to school or Hannah went to school” (a true statement).

Note that there is a semantic difference between “or” in the language and or in logic. In spoken language when we say “or” we usually mean that only one of the two options is true, and in logic it means that at least one of the two options is true.

Watch this video to see a slideshow summarising logic operators.

Share this video:

This video is from the free online course:

Maths Puzzles: Cryptarithms, Symbologies and Secret Codes

Weizmann Institute of Science