Boolean Operations

What are Boolean Operations?

Boolean Operations are simply AND, OR, NOT, or AND NOT. You will soon learn whatall these terms mean. They allways return true, if the statement is true of false, if the statement is false. Now we will learn what each of these terms means.

AND
To return a value of true both items must be true. If just one item is false then that will make the whole statement false. An example of an and statement would be I like cookies and milk This would be true because I do like both of those thing. A statement that would be My name is Nora AND I am 10 years old. This statement would be false because yes it is true that my name is Nora but I am not 10 years old, that would make the entire statement false.
OR
For an or statement to be ture only one of the values must be true. It it will also be true if both of the values are true, the only case in in which it will be false is that both statements are false. An example of this would be I am a junior in Highschool OR I go to Yorktown yes it is true that I am a junior but I do not go to Yorktown. So would this statement be true or false. Well it would be true because one of the statements is true.
NOT
A not statement is used in conjuction with either an and statement or an or statement. It flips the value of each item within the statement. If we were to think about this in mathematical terms we would say that NOT negates the statement. It is representing as an ! when programming and if it is outisde parentheseis of a statement then it will be distributed to each term in the statement. An example of this would be The sky is NOT purple AND The Earth is NOT flat This would be a true statement.

Logic Gates

A way of visually representing these statements would be through logic gates. Here is a chart that represents all of the combinations of Boolean statement.

Logic Gate