Video Transcript
The diagram shows a logic circuit consisting of three OR gates. How many of the inputs must have a value of one in order for the output to have a value of one?
As we’re told in the question, we’ve got a diagram here containing three OR gates. Two of these are over on the left-hand side of the diagram. We’ve got this OR gate here that has inputs labeled as 𝐴 and 𝐵. And beneath it, there’s this one with inputs labeled as 𝐶 and 𝐷. The output from each of these left-hand gates then becomes one of the two inputs for this OR gate over on the right. The output from this right-hand OR gate is then the overall output of the logic circuit. We are told that we want this output to have a value of one. And we’re asked to work out how many of these four inputs have to have a value of one in order for this to be the case.
Since this logic circuit consists entirely of OR gates, then to work this out, we’re going to 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 its two inputs or both of them have a value of one. Otherwise, so if both inputs are equal to zero, then the output of an OR gate is zero. We can use this information about how an OR gate works in order to draw something called a truth table for the gate.
The truth table is a table which lists every possible combination of the two input values, along with the output that an OR gate will produce for each such pair of inputs. If the first input is zero and the second input is also zero, then it’s not the case that either input has a value of one. And so, we’re looking at this second bullet point, which tells us that the output must be zero. If the first input is zero, but the second input is one, then now one of the two inputs does have a value of one. And so, an OR gate will give an output of one. Likewise, if the first input is one and the second input is zero, the OR gate will give an output of one.
Finally, if both the first input and the second input have a value of one, then again, we’ll get a value of one as our output. We can use the information in this truth table in order to learn something about the possible values of the inputs to this circuit. We’re being asked how many of the inputs must have a value of one in order to get an output of one. That means that we’re trying to work out the minimum possible number of these inputs that must have a value of one in order to get this output of one.
Let’s begin by looking at the OR gate on the right-hand side of the circuit. We know that this OR gate needs to have an output value of one. Looking at our truth table, we can see that this output rules out the first row because this gives an output of zero. In other words, it can’t be the case that both inputs to this OR gate are equal to zero. We can see though that all three of the other rows in the truth table produce an output of one. So any of these three combinations of input values would produce this output value of one.
We’re looking to find the minimum number of ones required among the four initial inputs. This means we’re going to want to pick one of these two middle rows from the truth table as the inputs to this right-hand OR gate because these two have one input of zero and one input of one, while the bottom row has both inputs set to one. And our job is to find the minimum number of ones that we can get away with while producing this output value of one.
Now, each of these two inputs is completely equivalent, and each one is an output from an OR gate over on the left of the circuit. Basically, this means that it makes no difference which input we choose to set equal to zero and which we choose to be equal to one. Let’s say that the upper input has a value of one and the lower input has a value of zero. This means that the upper OR gate over on the left must have an output value of one, while the lower OR gate on the left has an output of zero.
If we look at the upper-left-hand OR gate, we can see we’ve got exactly the same case we had when we considered this right-hand gate. Just as before, the output has a value of one. And so, we need to look at the bottom three rows of our truth table. Just as before, we can discount this bottom row, which has both inputs set to one because we’re trying to find the minimum number of inputs that must be equal to one. Also like before, it doesn’t matter which of these two middle rows we choose since that’s just a case of which of these two inputs we choose to be equal to one.
And we’re not concerned with the specific values of the individual inputs here. We just want to know the minimum number of these inputs that must be equal to one. In this case for that upper-left-hand OR gate, we know that this minimum number is one. And let’s arbitrarily say that input 𝐴 is equal to one, while input 𝐵 is equal to zero. The final OR gate to consider is this lower-left one here. We can see that the output of this gate is zero, which means that we must be looking at the first row in our truth table. That means that both the first input and the second input to the gate must be equal to zero. And so, both inputs 𝐶 and 𝐷 have a value of zero.
It’s worth reiterating that it really didn’t matter where we chose to put the ones in this diagram. Whatever choices we made, we would end up with one of the four inputs equal to one and the other three equal to zero. So, for example, if we’d taken the upper input to the final OR gate as zero and the lower input as one, then it would have been the upper-left-hand OR gate that had an output of zero. And so, both of its inputs must have been equal to zero. Meanwhile, the lower-left-hand OR gate would now have an output value of one, which would mean that at least one of its inputs must be equal to one.
To get the minimum number of ones, we’d set one of these inputs equal to one and the other equal to zero. For example, input 𝐶 is one and input 𝐷 is zero. Just as before, we’ve ended up with one input equal to one and the other three equal to zero. Our answer then is that in order to get an output of one from this circuit, the number of inputs that must have a value of one is one.