Multiplexer Logic
A logical multiplexer can be used to implement an arbitrary truth table, by connecting each input to the appropriate logic level. In the diagram above, a 3-to-8 multiplexer implements a function that determines if its input is prime.