Monday, August 29, 2011

Mux

A Multiplexer (MUX) is basically a selector. It has two input pins and a selector pin. Based on the selector, it selects one of the input pins.


If the selector is 0, then 'a' is selected, and if selector is 1, then 'b' is selected.

Let's start with an Axiom. Anything ANDed with 1 will result in that thing. So, 'a' AND 1 = 'a'

If we AND 'a' with NOT(selector), then the output of that AND gate (let's call it a1) will be 'a' if selector is 0. Similarly, if we AND 'b' with the selector, then the output of that AND gate (let's call it a1) will be 'b' if the selector is 1.

But along with this, we actually have to implement a conditional. If selector is 0, then 'a', else 'b'. The way to implement conditionals with logic gates is using the OR gate.

Now, if selector is 0, then 'a1' will carry the value of 'a', and 'a2' will carry 0. If selector is 1, then 'a1' will carry 0, and 'a2' will carry, the value of 'b'. Thus if we perform a1 OR a2, then we will get the correct answer.






No comments:

Post a Comment