It's probably worth while to give a little bit of information on digital logic, and how it relates to boolean algebra. note: what I'm going to say below is reasonably correct for a particular logic family called "open-collector TTL".
Let's start with what we might call the most most basic of digital circuits: the NOT gate
As we look at this, we can see the following basic parts, which we'll be reusing in the later discussion:
![]() |
The terminals show where this circuit element connects to other circuit elements: there's one labelled In, one labelled Out, and one labelled +5. There's also a special one for the "ground", which is where 0V is connected (there are so many connections to ground in a typical circuit that we need a shorthand to simplify the diagrams. |
![]() |
A "resistor" does just the name implies: it resists the flow of electricity, but doesn't shut it off all the way. If we were to put a wire between power and ground we'd just burn out the wire; if we put a resistor in between then current will flow, but not too much. |
![]() |
The switch is "open" (which means no electricity can flow
through it) when its input is at 0V (or ground), and it's "closed"
(which means electricity can flow) when its input is at +V.
Note: this switch is actually a transistor, and I'm using a comletely non-standard symbol for it to emphasize how we're using it. There are several different symbols in common use for a transistor, depending on just what type of transistor it is. |
So, how does this work? Let's ask two questions: what happens when +V is applied to the input, and what happens if 0V is applied to the input?
![]() |
When +V is applied to the input, the switch is closed:
electrically, it might as well be a wire. Because there's a
"wire" connecting Out to ground,
Out is at 0V just like ground is. There is some
current flowing through the resistor, but not enough to cause any
damage. So the result is that if In os at +V,
Out is at 0V.
|
![]() |
When 0V is applied to the input, the switch is open:
electrically, there is no connection between the output terminal and
ground.
Now, there's nothing trying to "pull" |
So, how can we relate this to logical operations? Suppose we decide that +V means "T", and 0V means "F". Then we can draw a table showing the relationship between the input terminal and the output terminal:
In | Out |
|---|---|
| F | T |
| T | F |
This circuit implements the logical NOT operation. There's even a special circuit symbol that the engineers use to denote this circuit:
For our second step, we'll create another circuit, but with two switches:
(note: the gap in the wire for In2 is meant to
show that it's passing behind the wire that's crossing it — it
isn't actually broken there
This time, if either In1 or In2
has +V on it, the Out will be pulled to 0V. Here's the
truth table for this one:
In1 | In2 | Out |
|---|---|---|
| F | F | T |
| F | T | F |
| T | F | F |
| T | T | F |
Looking at this table, the output is F if either of the inputs is T — so this is a "negated OR", frequently called a NOR. It's also got its own symbol:
Now, this isn't the way we're used to dealing with logic: we're used to using OR, not NOR. Well, we can wire up an OR gate pretty easily: just do a NOR, and then a NOT. Like this:
We can also wire up a NAND Gate:
This time, both of the switches need to be turned on to pull the output to ground. So this implements a NOT-AND, or NAND, gate.