Question Video: Finding the Number of Possible Input Combinations to a Logic Circuit Physics

The diagram shows a logic circuit consisting of three OR gates. How many different possible combinations of input values are there for this circuit?

04:36

Video Transcript

The diagram shows a logic circuit consisting of three OR gates. How many different possible combinations of input values are there for this circuit?

We can see that we’ve got a diagram here that shows a logic circuit which contains three OR gates. The circuit has four inputs, and these are labeled as 𝐴, 𝐵, 𝐶, and 𝐷. The inputs 𝐴 and 𝐵 are the two inputs to this upper-left-hand OR gate, while inputs 𝐶 and 𝐷 go into the lower-left-hand OR gate. The outputs from these two gates on the left then become the two inputs for this third OR gate on the right-hand side of the circuit. Finally, the output from this right-hand OR gate is the overall output of the logic circuit.

As it turns out in this particular question, we’re not actually concerned about this output value at all. Instead, the question is just about these four inputs. And specifically, we’re asked to work out how many different possible combinations of input values that there are. To answer this question, we need to recall that whenever we’re talking about a logic circuit, there are only two possible values, and these are zero and one. So, this means that each of the inputs to this circuit can either have a value of zero or a value of one.

So, input 𝐴 can have a value of zero or a value of one. And completely independent from the value of 𝐴, input 𝐵 can also be either zero or one. And again, independent of the values of the other inputs, input 𝐶 can be either zero or one and input 𝐷 can separately be either zero or one. So then, we’ve got four different inputs, and there are two possibilities for the value taken by each of these inputs.

We want to work out the number of different possible combinations of these four input values that there are. Now, there are a couple of different ways that we could go about this. One approach would be to methodically go through and explicitly write out all of the different combinations and then count them up. However, not only is this approach quite a time-consuming one, but there’s also the possibility of accidentally missing out one of the different combinations. And if we did this, we would get the wrong answer.

Luckily, there’s a better approach that we can use. We know that we have four different inputs, each of which can take either of two possible values. These inputs are all totally independent, which means, for example, that whether input 𝐴 is equal to zero or to one doesn’t affect the potential values for inputs 𝐵, 𝐶, and 𝐷. These can each independently be equal to either zero or one. Then, the total number of different possible combinations must be equal to the two possibilities for input 𝐴 multiplied by the two possibilities for input 𝐵 multiplied by the two possibilities for input 𝐶 and finally multiplied by the two possibilities for input 𝐷. So, we’ve got that this total number of combinations is equal to two times two times two times two. That’s one factor of two for each of the four inputs to the logic circuit.

Now, we could simply go ahead and evaluate this expression. However, we can first gain a little bit more insight into the problem by noticing that we can rewrite this product of four factors of two as two raised to the power of four. And now, if we look at this expression for the number of different combinations, we can identify two as the number of different values that each input could have because each of the inputs could either be zero or one. We can also identify four, the power that two is raised to as the number of inputs because we’ve got the four inputs 𝐴, 𝐵, 𝐶, and 𝐷.

In fact, as a bit of an aside, this result that we found can be generalized. If instead of four inputs, we had a logic circuit with some general number of inputs, which we’ve labeled as 𝑁, then the number of different possible combinations of the values of these inputs would be equal to two raised to the power of 𝑁. That’s because each of the 𝑁 inputs could have either of the two values zero or one. So then, just as we found for four inputs the number of combinations was equal to two times two times two times two, that’s four factors of two and this gave us two to the power of four, then for 𝑁 inputs, we’d end up with a product of 𝑁 factors of two, which we could write as two to the power of 𝑁.

Now, getting back to the question, in our case of four inputs, we know that the number of combinations is equal to two raised to the power of four. Evaluating this gives us our answer that the number of different possible combinations of input values for this circuit is equal to 16.

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy.