# Question Video: Evaluating the Output of Multiple OR Gates Using Truth Tables Physics

The diagram shows two OR gates connected as part of a logic circuit. The truth table shows the output for the various combinations of inputs. What is the value of 𝑝 in the table? What is the value of 𝑞 in the table? What is the value of 𝑟 in the table? What is the value of 𝑠 in the table?

07:40

### Video Transcript

The diagram shows two OR gates connected as part of a logic circuit. The truth table shows the output for the various combinations of inputs. What is the value of 𝑝 in the table? What is the value of 𝑞 in the table? What is the value of 𝑟 in the table? What is the value of 𝑠 in the table?

Okay, so we’ve got four parts to this question, and each of these parts is asking us to find the value of one of the quantities 𝑝, 𝑞, 𝑟, and 𝑠 in this truth table. We’ll tackle these parts one at a time, starting with this first one. This says, what is the value of 𝑝 in the table? If we look at our truth table, we can see that 𝑝 is one of the possible values for the input 𝐶 in this logic circuit. Specifically, the second row of the truth table tells us that 𝑝 is the value of input 𝐶 that when input 𝐴 has a value of zero and input 𝐵 also has a value of zero, then the combination of these three inputs means that the logic circuit as a whole has an output of one.

Knowing that we’re considering the second row in the table, let’s see how this applies to our logic circuit. We can see that the circuit consists of two OR gates. We’ve got this left-hand OR gate whose inputs are input 𝐵 and input 𝐶. The output from this first OR gate then becomes one of the two inputs for the right-hand OR gate. The other input to this second OR gate is input 𝐴. And then its output is the overall output from this combination of OR gates. So that’s the final column of our truth table.

Let’s put the values from the second row of the truth table onto our diagram. We have that input 𝐴 is equal to zero, input 𝐵 is equal to zero, input 𝐶 has a value of 𝑝, which is what we’re trying to find, and finally the output has a value of one.

To understand what’s going on here, we need to recall how an OR gate works. An OR gate is a type of logic gate that gives an output of one if either of the inputs or both of them have a value of one. Otherwise, so if both of the inputs have a value of zero, then the output is zero. Just as we have this truth table for the whole of the circuit that we’re shown, we can also write out a truth table for an individual OR gate. An OR gate has two inputs, which we’ve generically labeled here as a first input and a second input. And the OR gate gives a single output value dependent on these two inputs according to this logic we’ve explained here.

If the first input has a value of zero and the second input is also zero, then this first bullet point doesn’t apply because neither input has a value of one. This means that we must be looking at the second bullet point, and so in this case the output of the OR gate is zero. If the first input is equal to zero but the second input is equal to one, then now one of our two inputs does have a value of one, and so the OR gate has an output of one. Similarly, if the first input is one and the second input is zero, then that’s at least one input with a value of one. And so we’ve got an output of one. The last case to consider is that the first input is one and the second input is also one. This first bullet point tells us that the output of an OR gate is one if either or both of the inputs are one. In this case, we’ve got both inputs equal to one. And so the output must be one.

With this table in mind, let’s now have a look at the diagram. Specifically, we’re going to start by considering this right-hand OR gate. We know that it has an output value of one. And we also know that one of its inputs, input 𝐴, has a value of zero. We know from our OR gate truth table that if both inputs have a value of zero, then the output must be zero. Now that’s not the case here because our output value is one. So since input 𝐴 is zero, this means that the other input to this right-hand OR gate must have a value of one. This lower input to the right-hand OR gate comes from the output of the left-hand OR gate. So we know that the output of this left-hand OR gate is equal to one.

If we now consider the inputs to the left-hand OR gate, we can use exactly the same logic as we used for the right-hand gate. Since the output has a value of one, then our truth table tells us that it can’t be the case that both inputs have a value of zero. Since we know that input 𝐵 is equal to zero, then this means that input 𝐶 cannot be equal to zero. And so 𝑝, which is the value of input 𝐶 in this case, must be equal to one.

Okay, now let’s move on to the second part of the question. What is the value of 𝑞 in the table?

Okay, so now we’re thinking about the quantity 𝑞, which is one of the possible output values for this combination of gates. The fourth row of this table tells us that 𝑞 is the output value we get when input 𝐴 is zero, input 𝐵 is one, and input 𝐶 is one.

Let’s put these values on our diagram. If we look at this left-hand OR gate, we can see that input 𝐵 is one and input 𝐶 is one. And so we’re looking at the bottom row of our truth table for a single OR gate. We can see that both inputs equal to one mean we’ve got an output of one. And we know that this output then becomes the lower input for the right-hand OR gate.

If we now look at this right-hand gate, we can see that the upper input, input 𝐴, is equal to zero, while the lower input is equal to one. The middle two rows in our OR gate truth table tell us that so long as at least one input has a value of one, the output of an OR gate will have a value of one. 𝑞 is the output value that we get when we’ve got one input of zero and one input of one. And so 𝑞 must be equal to one.

Now let’s look at the third part of the question. What is the value of 𝑟 in the table?

If we look at the truth table, we can see that 𝑟 is one of the possible values of input 𝐴. In particular, it’s the value of input 𝐴 that when input 𝐵 is zero and input 𝐶 is also zero, the circuit as a whole gives an output value of one. So let’s add the values from this row of the truth table to our diagram. If we start by looking at the left-hand OR gate, we can see that both of its inputs have a value of zero. This means that the output from this OR gate must be zero. And therefore, the lower input to this right-hand OR gate must be zero. We can see that the output of this right-hand OR gate is equal to one. And we know that its lower input is zero.

From our OR gate truth table, we can see that if both inputs were zero, then the output would be zero. So this means that the other input, input 𝐴 or our value of 𝑟, cannot be zero. So then we must have that 𝑟 is equal to one.

Let’s now move on to the fourth and final part of the question. What is the value of 𝑠 in the table?

Looking at the truth table we’ve been given, we can see that 𝑠 is the output value when input 𝐴 is one, input 𝐵 is one, and input 𝐶 is zero. Let’s go ahead and put the values from this row of the table onto our diagram. We’ll begin by looking at the left-hand OR gate. It’s got one input, input 𝐵, equal to one, and the other input, input 𝐶, equal to zero. Since at least one input is one, then the output of this OR gate is equal to one. And so the lower input to the right-hand OR gate is also one. If we now look at the right-hand OR gate, we can see that both of its inputs are equal to one, and so its output must be equal to one. The output of this right-hand OR gate is our value of 𝑠, and so we have found that 𝑠 is equal to one.