Booleans & Truth Tables
The logic behind booleans is either true or false, 1 or 0. A statements is made and tested for a binary result.
If the statement is true then execute code. In this statement I want to know if sushi is true.
If NOT sushi and ramen is false then execute code. In this statement sushi is true so NOT sushi is false. If the statement is found to be true then proceed with code execution.
ORIn boolean 1 = TRUE and 0 = FALSE. By using boolean logic the OR operator written as + we can see that 1 + 1 = 1 and 1 + 0 = 1 and 0 + 0 = 0. Only one must be found to be true to make it a true statement.
Think of the operator OR as an alarm that can only be on or off. Then we can see that having one alarm ON will make a sound regardless if the other alarm is on or off.
When using the AND operator written as * both must be true to equal true otherwise it will default to false.