2.3 True or false?
From arithmetic, let’s turn to basic logic. Here, there are only two values: True and False. We want to know what we can do with one or two of these values. True`gate-style False`gate-style
The most interesting thing you can do to a single logical value is to replace it with the other. Thus, the not operation turns True into False and False into True: gate$not`gate-style not`gate-style
not True = False
not False = True
For two inputs, which I call p and q, there are three primary operations, and, or, and xor. Consider the statement, “We will get ice cream only if you and your sister clean your rooms.” The result is the truth or falsity of “we will get ice cream.”
If neither you nor your sister cleans your rooms, or if only one of you cleans your room, the result is False. If both of you are tidy, the result is True, and you can start thinking about ice cream flavors and whether...