# What Notation for Teaching Boolean Logic?

I'm a retired college teacher now teaching things like Boolean logic to students in several middle schools (ages: 11-14). I taught that module for the first time last week and discovered to my chagrin that I had mixed two different notations. I'm teaching specifically logic expressions, with very little manipulation using the identities of Boolean algebra.

I started out with the standard notation of logic: ∧, ∨, and ¬ but used center-dot, plus, and overbar by accident in a table of identities. I worry that using + for inclusive disjunction will confuse students, and I know that implicit multiplication, i.e. AB for A∧B is confusing.

I hesitate to use the notation of programming because it seems Java and Python are equally popular, but with very different notations. Java's use of ^ for exclusive disjunction further muddles things.

Does anyone know of research or have practical advice on what notation I should use to teach these concepts?

Edit: OK, I've accepted an answer, and decided to use the engineering notation, but to present a table comparing notations near the end of the module. I chose end rather than beginning because I want the students familiar with one notation before I present the others. I'm going to start another question about how to explain + as OR.

• As an engineer, I like $\cdot, +, \oplus, \overline{A}$, but this is because it what I learned first. Also, the associative, distributive laws from multiplication and addition hold, so that intuition carries over. Using programming notation (C, Java, Verilog, for example) you need to distinguish between bitwise and logical operators, which adds unnecessary confusion – copper.hat Feb 12 '18 at 6:02
• Good grief teach them that names are arbitrary. – philipxy Feb 24 '18 at 1:52

If your students were a bit older, I'd be more comfortable with the following, but suggest it anyway.

There is an advantage for a student to know that the concepts exist independent of any notation and that historically notations have differed based on use and context.

I would, myself, provide them with a handout giving names to the concepts and various notations used for each. Then, I'd use the various symbols as naturally as possible, responding to the inevitable questions.

The only caveat would be that you don't mix the different systems in any given lecture/conversation. You should also suggest that the students be consistent as well.

The rationale here is that students will likely see different symbols sooner rather than later if they do any reading or research outside your instruction. It is better that they have some preparation and at least a hint that the terminology isn't entirely consistent or standardized.

Some of the terminology, by the way, such as + for "or" is actually tied to the concepts in interesting ways. For example, the similar shape of ∧ and ∩ help students understand the relationship between logic and set theory. Some of the symbols, on the other hand, were chosen for no better reason than that they exist on common input devices such as keyboards.

• Middle school was when I was introduced to multiple notations for things like multiplication and division. I don't recall anyone in my class having trouble with the concept. – Mark Feb 11 '18 at 21:37
• I've never taught that age level, nor was I a particularly good student then. Hence my hesitation. Thanks for clarifying. – Buffy Feb 12 '18 at 13:36

As per ctrl-alt-delor's response, I use different systems with different groups. It has been my experience that most of my students use no formal system of Boolean Algebra prior to beginning studies in CS, so I will typically start with whatever programming language they have the most experience with.

In my program they traditionally use Java. (Here's a hint from the trenches: while Java does indeed use ^ for $\oplus$, most students are unaware of this operator or its function. You may find that there are fewer translation issues for the students if you use !=, which accomplishes the same thing in a purely Boolean world. This gives you the side benefit of being able to describe $\overline{A \oplus B}$ as A == B, which is instantly and intuitively understandable.)

No matter which system you use, it is worth it to give all of the symbols once when doing the truth tables. (I also include the gates when I do this). This way, they will at least see the systems once, and if you accidentally write a symbol from the wrong system on the board while you are talking, they will not become nearly as confused.

You may still have to correct what you wrote for the sake of consistency, but at least they will know that there are additional notational systems in the first place, so they'll see your correction as a notational translation instead of something more perplexing.

• ^ is not same as "=. The first is bitwise, and works on ints. The second works on bools (and is only true/false). – ctrl-alt-delor Feb 17 '18 at 10:29
• @ctrl-alt-delor you missed the "in a purely boolean world" part, which is the context in which the statement holds true. It's a way of helping them to intuitively understand the operation. When we start doing this with logic gates, the difficult transition becomes understanding that the signals are themselves bits, not the action of the XOR gate. That part remains intuitive. – Ben I. Feb 17 '18 at 14:39
• Oh I get it. For bool type, that is single bit, != and ^ are the same. (Oh and I just noticed my typo in the comment above.) – ctrl-alt-delor Feb 17 '18 at 17:23
• @ctrl-alt-delor Your Dvorak keyboard does make for interesting typos. :) Always a joy to translate the puzzle to see what you meant to type. – Gypsy Spellweaver Feb 19 '18 at 6:13

The two systems have different value.

# For $$\land$$, $$\lor$$, $$\lnot$$

• It is good in that you can see its relationship with set theory. ∧, ∨,<,> vs ∩, ∪, ⊂, ⊃

• The not symbol is easier to type that the bar from the other system.

# For $$\cdot$$, $$+$$, $$\bar{}$$

It is easier to learn. Boolean algebra is algebra (Bidmas and all that).

For the most part you can manipulate the algebra using rules that you learnt in maths class. Except that $$2=1$$, that therefore $$2+1=1+1=2=1$$ etc.

Therefore

• $$1+1=1$$
• $$a·a = a² = a¹ = a$$

Most of the rules can be worked out from $$1=2$$, though it is worth also learning DeMorgan theorem, and learning to derive all of the rules from this one basic rule and regular algebra.

• Be a bit careful with the second concept, though, if the students ever get near the C programming language, where "true" - "true" and "true" + "true" can be true or false. i.e. both 1 and -1 are "true", as is 2. Only 0 is false. – Buffy Feb 11 '18 at 19:46
• @Buffy I don't think even a first-year student would try to add boolean values in C instead of using || (or even cascaded if statements). – user253751 Feb 12 '18 at 4:42
• @Buffy you can do it in C, but I would not recommend it. You have to normalize after every operation. Same as when doing it by hand. int booleanNormalise( int a ) {return !!a; }. Works on most Cs, not sure if guaranteed to work. It is a long time since I was a C language lawyer. – ctrl-alt-delor Feb 12 '18 at 11:04
• @immibis You would be surprised what people will do. First year students and veteran programmers alike. I have traced many bugs to that very concept: using the addition operator in Boolean logic because they learned Boolean algebra so well. I've even seen it done with tinyint in MySQL. – Gypsy Spellweaver Feb 19 '18 at 5:54
• @ctrl-alt-delor Rather than create a function to make it look legitimate, why not not not inline, and admit that it's a gludge? Shows exactly what's being done, without having to make a function, (probably will be optimized out during compilation anyway) and having to remember what booleanNormalize does every time it's encountered. Save several bytes of file space as well. – Gypsy Spellweaver Feb 19 '18 at 5:58

On a very personal note, I prefer

($\cdot$), ($+$), ($\bar{}$)

as per ctrl-alt-delor's second point.

It's easier to understand because the notations which they represent are also used in Trigonometry. So the students can easily relate the function of the symbols.