Section 1: Notation


Show All Content (Currently paginated.)
A thorough understanding of correct notation is a huge part of being able to correctly follow mathematics and programming. Part of the problem with approaching a new area of knowledge is simultaneously getting used to brand new symbols as well as connecting symbols to ones you already know. Any of you who have taken physics and statistics have seen this extensively (μ is both the normal force as well as the population mean!).

Some of the symbols and notation we will use might seem familiar to you, so capitalize on that to help you keep track of which is which. As with most things we do in this class, you can find much more extensive information on various sites. I will typically reference Wikipedia as it is a great source of such detailed information (even if not an academically valid source).

Let’s start with the ideas you already know about booleans, except we’re giving them new symbols.

Symbol Name Description
T TRUE Let’s be lazy and not write out the whole word.
F FALSE
AND Is true only when both inputs are true.
OR Is true when either one, or both, of the inputs are true.
¬ NOT Reverses the value of the input.

While these symbols are slightly different than the operators we use in Java, they act the exact same way. One key thing to keep in mind is that AND comes before OR. You can always use parentheses to enforce a particular order though.

Give yourself a quick check to make sure you understand what each symbol does. Select the correct value for each expression.

1. ¬T


2. T∧F∨T


3. F∧T∨F


4. T∧¬F


5. F∨¬(T∧F)


6. ¬F∧¬(¬T∧¬F)




Now that you’ve seen the notation for the boolean operators you already know, let’s throw in some Geometry! The next two things we’re going to look at showed up when you were doing proofs in Geometry. They take a bit more getting used to in order to think through them correctly.

Symbol Name Description
IMPLIES If the hypothesis (first value) is true, then the conclusion (second value) needs to be true. The tricky thing with this one is that if the hypothesis is false, the statement as a whole is true regardless.
IFF (If and only iff.) The two inputs need to be the same. This is a biconditional in Geometry.

Let’s take a look at some examples of these to help get the idea. Implication is perhaps easier to think about in real-world context.

It’s currently snowing. → I will wear a coat.
This implication statement identifies that if it’s snowing out, then I will wear a coat. Logically (not programmatically) does that mean that I will not wear a coat if it’s not snowing?

It doesn’t actually say anything about what happens when it’s not snowing, so the statement is true regardless when it’s not snowing.
It’s currently snowing. ↔ I will wear a coat.
This time, with the biconditional implication, if it’s snowing then I will wear a coat. If I’m wearing a coat, then it’s snowing. Now, according to the statement, one cannot happen without the other.

If it’s not snowing and I am not wearing a coat, then the statement as a whole is true!

When we throw in the logic notation with these new symbols, things start to get a little more complicated. If I say

T→F

then I have said a false statement. The hypothesis (T) is true, but the condition (F) is false.
However…

F→T

is a true statement! These can get a bit messy to follow, but in section 3 of this chapter we will explore how to nicely write out the more complicated connections.

Try another quick check to test yourself on these symbols.

1. T→T


2. F→F


3. T↔T


4. T→¬T


5. (F→T)∧T


6. (T∧F)↔(T∨F)





The last symbol that we’re going to use (although definitely not the last symbol in general…there are a lot more) is called the “exclusive or” or “XOR” for short. It’s a lot easier to wrap your head around.

Symbol Name Description
XOR Returns true if the two inputs are different. In other words, if one of them is true, but they’re not both true.

Try one last quick check to test yourself on all of the symbols.

1. T⊕T


2. F⊕F


3. F⊕T


4. ¬F⊕T


5. (F⊕T)→T


6. (F⊕T)⊕F


7. (F⊕F)↔(T⊕T)





That’s it for the basic symbolization. In the next section, you will apply the logical symbols to some application statements.

← Previous PageNext Page →