To make more complex circuits we can use the output of some logic gates as the input to other ones. Doing this allows us to compute functions not described by the basic logic rules and functions that involve more than two inputs.
In other words, we want the output to be on only if the first input is on and the second is not. There is no basic logic rule that matches this function. However, we could implement the desired behavior with the circuit below. Try clicking the Input switches to test each of the four possible combinations - verify the circuit does what it is supposed to.
More complex circuits can have more than 2 inputs or more than one output. Here is a three-input circuit - see if you can figure out what state the input switches need to be in to produce an โONโ for output.
To write the truth table for that circuit, we need to have every possible state for the three inputs. For 3 inputs, each with 2 possible states, there are \(2^3 = 8\) possible combinations (000, 001, 010, 011, 100, 101, 110, 111). Thus, the truth table needs eight rows to show the possible inputs. If we try out each possibility, we can determine the outputs that go with each of the eight possible inputs:
In the first circuit, Input 2 passes through a NOT gate before reaching an AND gate with Input 1. What is the output when Input 1 is 1 and Input 2 is 0?