# Explaining the Value of Knowledge of Digital Logic

I am a college teacher developing an introduction to digital logic for grades 8-12. This is a special topic that will be presented in three 50-minute periods with in-class exercises. It won't go beyond basic combinational logic. Provisionally, module 1 starts with gates and truth tables and ends with a half-adder; module 2 extends to a four-bit ripple-carry adder, and module 3 extends the ripple-carry adder to make a two's complement adder/subtractor. These are not set in stone, but will be rather soon.

I am struggling with how to explain the importance of a knowledge of digital logic to high school and upper middle school students. I want something better than, "To help you understand that computers are not magic." Ideally, the explanation would be only a short paragraph, and memorable.

So, how can I explain the importance of comprehension of simple digital logic to pre-college students? That is, how do I explain why students should care about this topic?

Edit: Well, I'm teaching this to eighth-graders beginning Wednesday! Day one is about what I planned last fall. Day 2 has a ripple-carry adder and something else. I'm still dithering between adder-subtractor and S-R latch which becomes a D-latch. (I'm not sure the kids have enough grounding in binary arithmetic for the adder-subtractor.)

Day 3 now introduces a little bit of Boolean algebra. The kids are introduced to Kat, who is heading for Hogwarts, and must design Kat's cat checker. There are five inputs and three possible "OK" results from among the combinations.

For the explanation that everything computers do comes from a few simple circuits, as suggested by Ben I. below, I'm going to show this video at the beginning of day 1: https://www.youtube.com/watch?v=ZoqMiFKspAA

• Hi I was wondering 5 years later do you have more insights about your question? Feb 12, 2023 at 5:39
• @Qiulang邱朗 Sadly, I haven't. Student reaction remains "Very cool!" or "Meh" and I seem not to have changed the mix. Feb 12, 2023 at 13:28
• Thanks for the reply. Can you look at my question here, cseducators.stackexchange.com/questions/7536/… ? One of the reasons I found your question is I am also thinking about teaching them digital logic Feb 12, 2023 at 14:24
• @Qiulang邱朗 I hesitate to promote my own writing here, but have a look at this: professorbrown.net/concepts (Chapter 6 is incomplete, but will be complete by the end of March.) Feb 12, 2023 at 15:13
• I have 2 books in my mind so far 1. howcomputersreallywork.com 2. code.energy/computer-science-distilled , after briefly checking your book I find they are similar and I will read your book later. Thanks again. Feb 12, 2023 at 15:33

I would begin with the following factoid, which is an adaptation of the blurb I've used pretty successfully as a hook to get my students (grades 9-12) to sign up for my processor class:

Our computers seem to be capable of miracles, but literally every thing that a computer does comes down to only four small logic operations: AND, OR, XOR, and NOT. How is this possible? You'll get a flavor of this over just three periods of digital logic.

Also, in the interest of fostering your success in the high school class, here are a few cognitive traps that surprised me when I first began teaching my processors course. The skill difference between designing a half adder and a full adder (once a student has gained some mastery of the seven logic gates) is almost nonexistent, but understanding the relationship between a bus and a number can be tricky for students at the start, and without that, the wiring never makes any sense.

My trick, which you are welcome to borrow, is to do a 5-bit1 binary addition the regular math way, then encircle the various columns in some shape (and the lowest-significant bit addition with some other shape), and add the appropriate wires coming in and out (with their values). It helps to make sure that your columns are spaced out an almost unreasonable amount. This allows you to get the carry-out to carry-in transitions. Finally, when you draw the wires out of the bottom, have them curve in towards each other until they are traveling almost entirely together. Then you get to explain a bus as a series of wires that holds a number. If you follow this up with a photo of a bus wired into an old board and an SVGA cable ending, it creates a pretty powerful connection for the students.

Further cognitive traps: as absolutely silly as it sounds, you should carefully explain the difference between AND and OR. As strange as it sounds, AND/OR confusion is fairly regular. AND/XNOR can be similarly confusing (since students regularly confuse logical && with logical ==)

Finally, if you are going to culminate in an adder/subtractor, you may want to add in a multiplexer, since it's basically free.

1 - 4 bit sometimes does not get the point across, but 8 bit is overkill. 5 bit seems to be around the sweet spot.

Your best bet of how to answer why students should care is to stop and ask yourself what good reasons there are to care about it (or any topic). Do that before reading on?

OK, so my answer is: because science. The word means knowledge. If you want to know something instead of just have opinions (possibly wrong) or worse, then you will want to be finding out. But why bother to know anything, is really the question. Caring is your issue. Caring means that one can influence things, and not caring means that one will be pushed around helplessly by circumstances.

Is it effective to care, is the obvious question? Can we actually learn enough to have any effect? When things seem perplexing and obscenely complicated, then it appears hopeless. Science brings hope because it is able to render the complex simple enough to manage. When I found out that all matter is composed of just 3 elementary particles, and that there are basically only 2 forces that affect us, only one of which we have any control over, it was revolutionary. If more people knew these things, they might wish to learn more. When you ponder the 88 keys on a piano, able to make basically all (western) music, or the 92 naturally occurring elements making basically all things, it is astonishing. The organization of atoms (predicted 2500 years ago) in to the stunning wonder of the Periodic Table is a great story!

All computers are made of transistors, and built up in to a few simple circuits replicated millions of times, like the cells of the body or brain. If that is not inspiring and provoking of interest, I would release the students from school, as they are unreachable: they don't care to have an influence on their own future.

As many of them will go on to become computer engineers as programmers. Computer engineering is all about logic circuits. You teach them at this level for the same reason you teach them programming. Besides, some problems are not solvable in real time by software alone.

For a fun reason they might appreciate more directly, Redstone circuits in Minecraft are integrated circuit problems time scaled to the minecraft heartbeat. You could have them make the circuits in Minecraft. Have them build boobytraps for the last person through the door, or other problems that require complex logic.

I'll assume that they are interested in their digital devices and also have at least a bit of interest in how they really work: why they are cool.

First, you could explain the reason that computers use binary is that it is relatively easy and inexpensive to make physical components (transistors, say) that are bi-stable. Stable in one of two states: on-off, high or low voltage, etc. Now we want an effective way to manage changes of state, hence digital (actually binary) logic. Next do a bit of binary addition using the usual add and carry algorithm they are already familiar with in base 10. With that you can back up to truth tables and your other topics of interest. For the younger students you might also use some physical representation of a transistor made of paper or wood.

If you search online you can find discussions of binary logic done with fluids (Fluidics) and possibly even a video of a transistor-like valve. You can also have the students act out a transistor switch, sending pulses (i.e. students) either left or right. This assumes you have enough students to make it work, say about 10 or more.

• The physical activity seems impractical for the amount of time available for the material that @BobBrown wishes to cover.
– Ben I.
Nov 27, 2017 at 1:57