# Explain the internals of digital multiplexers

We were taught ayt our school about data selectors or multiplexers as basically a OR gate taking input of some decoder (Binary to Decimal,Bin2Hex,etc.) with an EXTRA INPUT Lines attached to the AND gates and the output of AND gate is fed to OR gate Something along the line of this:

This has confused me (google resources added to that confusion.It put me to conflict between what taught at school and what's there).

Can someone explain:

1. Why do we need Bin2< desired_base > DECODER
2. How they help us select a particular input over the others
3. How the receiver knows what kind of input the given output from multiplexer maps to Since just a HIGH or 1 can represent different combo of Inputs

4. In simple words how the DECODER or more appropriately said DEMULTIPLEXER revert/decodes back the INPUT

5. Applications of MUX and how it used in those applications (can you give a big picture of it)
• For your question 2, you could create a truth table for that circuit add analyse the results. – Tyler Apr 14 '17 at 15:53
• I want to understand intuition behind it why we need those values in the first place an how their variations suits our purpose(what are going to achieve using different values or what problems they address in mulltiplexing those inputs) – Xasel Apr 14 '17 at 15:59

To understand how a multiplexer works, take a look at this picture: You have $$\n=2\$$ address lines and $$\2^n=4\$$ data lines. What the decoder does is it selects only one of the data lines. What happens is you put your address in, and only one of the decoder outputs becomes high. Next the signals go through the AND gates. The selected AND gate has output $$\I_k 1 = I_k\$$. All the other AND gates have outputs $$\I_m 0 = 0\$$ since all other decoder outputs are low. Finally, the OR gate is used to combine the outputs of the AND gates.

Multiplexers are one of the basic building blocks in digital electronics. They are used in a verity of applications. Anywhere when you want to connect something with many outputs to a single input such as : busses, memory management units, ALU function select etc.

You can think of the mux you show as a four position switch. The A and B inputs control the position of the switch.

If A and B are both Low, the switch will connect input D0 to the output Y.

If A is Low and B is High, input D1 will be connected to Y.

etc...

The easiest way to understand a MUX is to think of each of those AND gates in that column as a switch that is turned on by a unique combination of the A & B logic levels.

If you look at your image, you will see that each gate is connected to a unique combination of either $A, \overline{A},B$ or $\overline{B}$ so only one is enabled at any time. The big OR gate simply sends out a logic 1 level if the selected gates input signal is high.

Typically you use a mux to select what the next gate is looking at.

For example using a single pin on a micro to examine multiple switches. THe micro would output 0,0 on $A$ and $B$ and read the output of the mux, then outut 0,1, read..etc.

They can also be used to serialize a width of data into a single line for communication purposes.