Binary representation of circuit inputs and outputs.

In practice logic gates don’t have to be limited to just two inputs. Also, when we build circuits from logic gates, we can end up with many individual inputs and outputs. In these cases we can group the logic levels of the individual inputs together to form a single binary number/code. We can then think of the circuit as having a single input which accepts binary codes. The decision making actions of the circuit then process this data, to produce a binary code at the output. For example, imagine that we have 3 individual switches to the inputs of a logic circuit, with 8 outputs connected to LEDs. Imagine that when switches 1 and 3 (going from bottom to top) are on and switch 2 is off, that only the first and fifth LEDs are lit (again going from bottom to top in the diagram). We could summarise this by saying when the input to the circuit is 101, the output is 00010001.

logic circuit