:PROPERTIES:
:ID: 39a06559-ef08-4a8a-834c-961e66ea8b54
:mtime: 20231013031815
:ctime: 20231013031643
:ROAM_ALIASES: selector
:END:
#+title: multiplexer
#+filetags: :public:project:
* Definition
A *multiplexer*, also called a *mux*, also
called a *selector*, is a type of digital circuit
which chooses 1 out of many inputs to steer its single
output.
For example, a 2-to-1 multiplexer takes in $x,y,z$ If $y = 1$,
the multiplexer returns $x$, and if $y = 0$, the multiplexer
returns $z$.
* How to draw a multiplexer
In a circuit diagram, you should draw
a multiplexer as a box with "mux" on it.
The inputs come in on the long side and the
control is on the side.
* N-to-1 multiplexer
It is possible to construct a $2^n$-to-$1$ multiplexer
with $n$ controls.
For example, you can construct a $8$-to-$1$ multiplexer using
$3$ controls.
* Mux as a Look-up Table
It is easy to implement a look-up table using
a mux.