### Video Transcript

In this video, we’re going to be looking
at a type of logic gate known as a NOT gate. A logic gate is a component with one or
more inputs and one output, each of which can take one of two values, zero or one. A logic gate will determine the value of
its output based on the input values it receives. Now, before we look at the specific
properties of a NOT gate, let’s first discuss some of the terminology that we use when we’re
talking about logic gates.

As we’ve already mentioned, the inputs
and output of a logic gate can each take one of two values. And these two values are often
represented as either zero or one. So the input can take a value of zero or
one and so can the output. However, there are many different ways of
representing the two values that an input or output can take. For example, instead of saying that an
output is set to zero, we may say that it’s set to false. And conversely, instead of saying that an
input or output is set to one, we could say that it’s set to true. Alternatively, instead of using zero and
one, or false and true, we could use off and on.

For example, let’s say that our input is
set to zero and our output is set to one. It would then be equivalent to say that
the input was set to false and the output was set to true or to say that the input was off
and the output was on. It doesn’t matter which set of
terminology we use as they’re all just different ways of representing the two possible
states of an input or an output. But we do need to be aware of the
different words we can use to describe them.

It’s worth noting that we use the off and
on terminology most commonly when we’re talking about electrical circuits. For example, let’s consider a logic gate
in an electrical circuit. So here’s our logic gate, specifically a
NOT gate, and we have an input on the left and an output on the right. These dotted lines just show us that the
circuit extends in this direction and this direction. In this context, the value of an input
describes whether or not a voltage is being applied to it. So if there were no voltage being applied
to the input, then we could say that it’s off. And this is equivalent to saying that it
has a value of zero or false. If we were to then apply a voltage to the
input, then its value would change to on. Or equivalently, we could say that its
value has now changed to one or true.

Similarly, the value of our output
describes whether or not the logic gate is supplying a voltage to it. So if the logic gate is providing a
voltage to the output, we can say that its value is on or one or true. Or if the logic gate is not providing a
voltage to the output, then we can say that its value is off or zero or false. So now that we started looking at a NOT
gate, let’s consider it in a bit more detail. The first thing to know is that this is
the symbol that we use to represent a NOT gate.

In this diagram, the input is on the left
and the output is on the right. We can see that the NOT gate has only one
input. And like all logic gates, it has one
output. As we mentioned earlier, logic gates will
give a certain output depending on the inputs that are provided to it. In the case of a NOT gate, the
relationship between the input and the output is pretty simple. If the input is zero, then the output
will be one or if the input is one, then the output will be zero. And that’s basically all there is to
it.

One useful way of representing how the
output of a logic eight depends on its inputs is by using a truth table. In a truth table, we have one column
showing the possible values of our output and another column for each input. So in the case of our NOT gate, because
there’s only one input, we only have one input column in our truth table. We also have an output column that shows
us the corresponding output for each of the inputs shown in the input column. In the input column, we can write down
the two possible inputs to a NOT gate, zero or one. Now, in the output column, we can write
down the output values that a NOT gate will give us for each of the possible inputs. When the input of a NOT gate is zero, we
find that the output is one. And when the input to a NOT gate is one,
we find that we get an output of zero.

And that’s it. We now have the completed truth table for
a NOT gate. This truth table shows us why we call the
NOT gate a NOT gate. The output that the gate produces is
always the opposite of the input. In other words, the output value is not
the input value. The symbol that we use to represent a NOT
gate is actually related to the way that it behaves. This part of the symbol represents an
arrow pointing from the input to the output, which on its own would suggest that whatever
value we put into the input would then be passed to the output.

However, the symbol for a NOT gate also
includes this circle. This is also known as an inverting
circle. And it’s used in logic gate symbols to
represent inverting a value, which means if it’s a zero, changing it to a one and if it’s a
one, changing it to a zero. So the symbol for a NOT gate actually
tells us what it does. It takes a value from the input, passes
it in the direction of the arrow, and then inverts it so that the output value will be the
inverse or opposite of the input value.

So now that we’ve looked at what a NOT
gate does, let’s solidify our understanding by looking at a NOT gate in action.

Let’s consider a simple situation where
the output of a NOT gate is connected to a lamp. Once again, we’re using dotted lines to
show that the circuit extends in this direction and in this direction. And really, we just do this so that we
don’t have to draw in the rest of the circuit. Let’s start by thinking about what
happens when the input of our NOT gate is set to zero. Because we’re dealing with an electrical
circuit, it would also make sense to say that our input is set to off. But just to keep things simple in this
explanation, we’ll stick to zeros and ones. A truth table tells us that when the
input of a NOT gate is set to zero, then the output will take a value of one.

In a circuit context, an output value of
one means that charge will flow through the output. Hence, there is a current through the
lamp, causing it to light up. Conversely, if we set the input to one,
then we can see from the bottom row of our truth table that the output will take a value of
zero. In a circuit context, this means that no
current is flowing through the output, which means no current is flowing through the
lamp. So it won’t light up. Now, this isn’t actually a very useful
application for a NOT gate as changing our input state will just switch the light on and
off, which would still be true if we didn’t have a logic gate at all.

However, this doesn’t mean that NOT gates
aren’t useful in real life. In fact, we need them for building most
digital circuits. And any smart phone or computer relies on
millions or billions of NOT gates in order to work properly. Now, let’s take a look at what happens
when we connect the output of one NOT gate to the input of another. Let’s call these two NOT gates A and
B. We can see that the output of NOT gate A
is connected directly to the input of NOT gate B. This means that whatever value is output
from NOT gate A will become the input of NOT gate B.

Let’s see what happens if, for example,
the input value of NOT gate A is zero. Our truth table for a NOT gate shows us
that, with an input value of zero, a NOT gate will produce an output value of one. So the output value of NOT gate A is
one. And because this is connected to NOT gate
B, that means that one is also the input value for NOT gate B. Once again, the truth table shows us what
happens at this NOT gate. With an input value of one, the output
value will be zero. So the output value of NOT gate B will be
zero. So we can see that, in this case, the
final output value is the same as the initial input value.

When we have several NOT gates connected
together like this, we can think of the series of input and output values as being like a
signal passing from left to right. The signal is changed or inverted every
time it goes through a NOT gate, such that if it were initially a zero, it becomes a
one. And if it were initially a one, it
becomes a zero. Now, let’s see what these two connected
NOT gates do when our input to NOT gate A is a one. Well, we know that each NOT gate inverts
the signal. So NOT gate A will change its input of
one into an output of zero. This then becomes the input for NOT gate
B. So NOT gate B will invert its input of
zero into an output of one.

This result confirms the fact that when
we connect two NOT gates together like this, the final output will always be the same as the
initial input. We can keep using the same method for
larger numbers of NOT gates connected together. For example, let’s imagine we had three
NOT gates connected together, called A, B, and C. If we have an initial input signal of
zero going into NOT gate A, then it will produce an output signal of one. This then becomes the input signal for
NOT gate B. So B produces an output value of
zero. And then this zero becomes the input
value for C. So C has an output of one. What we find is that when we have three
NOT gates connected together, the final output value will be the inverse or opposite of the
initial input value.

More generally, we find that if we have
an odd number of NOT gates connected in series, like we have in our diagram, then the output
will be the inverse of the initial input. But for any even number of NOT gates
connected together in series, the output will be the same as the initial input. Okay, so now that we’ve looked at NOT
gates in some detail, let’s have a look at some example questions.

Which of the following symbols represents
a NOT gate?

So in this question, we’ve been given
four fairly similar-looking symbols. And we need to figure out which one of
them is used to represent a NOT gate. We can actually work out the answer to
this question by recalling how a NOT gate works. The NOT gate is a logic gate that gets
its name from the fact that its output value is not the same as the input value. The inputs and outputs of logic gates can
only take the values zero or one. This means that if the input value of a
NOT gate is zero, then its output value must be one. Conversely, if the input value of a NOT
gate is one, then the output value must be zero.

We can represent this information in a
truth table, which shows us the outputs that are produced as a result of all of the possible
inputs. This statement and our truth table both
tell us something important about NOT gates, that is that they only have one input. And like all other logic gates, they also
have one output. We can use this information to help us
decide which of our answer options is correct. When we draw a logic gate symbol, we
usually draw the inputs on the left and the outputs on the right. If we look at option A, we can see that
it has one output, and it has two inputs represented by the two horizontal lines on the
left. This means that the symbol shown in
option A can’t possibly be a NOT gate because it has two inputs and a NOT gate only has one
input.

If we look at the other available
options, we can also see that options B and C have two inputs each, which means that neither
B nor C can be the correct answer either. So by process of elimination, we’re just
left with option D as it’s the only option we’ve been given that just has one input as well
as one output. To help us recall the symbol that we use
to represent a NOT gate, we should recall that the symbol we use actually represents the
function of a NOT gate. This small circle in the symbol for a NOT
gate is actually used in many different logic gate symbols, and it represents an
inversion. In other words, it represents a zero
being changed to a one or a one being changed to a zero.

The other part of the symbol for a NOT
gate is just an arrow pointing from the input to the output. So the symbol for a NOT gate represents
the fact that it takes a value from the input, passes it towards the output, and inverts it
along the way. Meaning that the output value will be the
opposite or inverse of the input value. Just as we’ve shown in our truth table
for a NOT gate. So this helps us confirm that the correct
symbol that represents a NOT gate is indeed option D.

Now that we’ve answered that question,
let’s take a look at another one.

The diagram shows three NOT gates
connected as part of a logic circuit. The truth table shows the two different
possible inputs. What is the value of 𝑝 in the table? What is the value of 𝑞 in the table?

So in this question, we’ve been given a
diagram showing a logic circuit consisting of three NOT gates. A logic circuit is made by connecting
logic gates together such that the output of a logic gate becomes one of the inputs of
another logic gate. For example, if we give the NOT gates in
our diagram the names A, B, and C, then we could say that the output of NOT gate A is the
input of NOT gate B. And similarly, the output of NOT gate B
is the input of NOT gate C. We’ve also been given a truth table,
although a couple of things about this truth table might seem slightly unusual.

A truth table is used to show how
different inputs or combinations of inputs produce certain outputs. And we often use them to show how a
single logic gate behaves. However, in this case, we can see that
the input and output referred to in the table are not just the input and output of a single
logic gate. Instead, they’re the input and output of
a logic circuit which contains three NOT gates. In addition to this, we can see that
instead of our outputs being given as zeros and ones, which would be normal for a truth
table, the possible outputs are given as 𝑝 and 𝑞. The questions we’ve been asked are, what
is the value of 𝑝 and what is the value of 𝑞?

Since 𝑝 and 𝑞 are in the output row of
our table, these questions are essentially asking us, what are the possible outputs of our
logic circuit? Specifically, 𝑝 refers to the output
when the input to our circuit is zero. And 𝑞 refers to the output when the
input to our circuit is one. So to find 𝑝, we need to figure out what
the output of our circuit would be when the input is zero. Well, if our initial input to our circuit
is zero, that means that NOT gate A has a zero as its input. Let’s recall that the output of a NOT
gate will always be the inverse of its input. In other words, if we input a zero into a
NOT gate, then it will output a one. And if we input a one into a NOT gate,
then it will output a zero.

So if our input into NOT gate A is a
zero, then its output will be a one. And our logic circuit diagram shows us
that the output of A becomes the input of gate B. Since B is a NOT gate as well, inputting
a one will mean that it outputs a zero. And this then becomes the input to gate
C. Once again, gate C is a NOT gate,
too. So inputting a zero will mean that it
outputs a one. And we’ve now reached the end of our
diagram. So we’ve shown that when we input a zero
into our circuit diagram, then the output labeled in the diagram will be one. And since 𝑝 represents the output of the
circuit when the input is zero, that means that the value of 𝑝 in the table is one.

The value of 𝑞 in the table represents
the output of the circuit when the input to the circuit is one. So let’s see what happens when we input
one into our logic circuit. As before, each of the NOT gates will
invert the input, meaning a one is changed into a zero or a zero would be changed into a
one. Since NOT gate A has an input of one,
that means it has an output of zero. This means that NOT gate B has an input
of zero, so it has an output of one. And finally, if gate C has an input of
one, then it has an output of zero, which means that the overall output of the circuit is
zero. And so the value of 𝑞 in the table is
zero.

Okay, so now we’ve looked at a couple of
example questions. Let’s summarize what we’ve talked about
in this lesson. Firstly, we’ve seen that a NOT gate is a
logic gate with one binary input and one binary output, where the word binary simply means
that it can take one of two values. So the input of a NOT gate can take a
value of either zero or one and so can the output. Secondly, we saw that the output of a NOT
gate is the inverse of the input, meaning that if the input is a zero, then the output will
be a one. And if the input is a one, then the
output will be a zero. And finally, we saw that NOT gates, along
with other logic gates, are commonly used in the circuitry found in computers.