From WikiChip
Editing multiplexer

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

This page supports semantic in-text annotations (e.g. "[[Is specified as::World Heritage Site]]") to build structured and queryable content provided by Semantic MediaWiki. For a comprehensive description on how to use annotations or the #ask parser function, please have a look at the getting started, in-text annotation, or inline queries help pages.

Latest revision Your text
Line 12: Line 12:
 
== Description ==
 
== Description ==
 
<span style="float:right; display: inline-block;">[[File:3reg mux31.svg|200px|A simple selection of 3 [[register]]s.]]</span>
 
<span style="float:right; display: inline-block;">[[File:3reg mux31.svg|200px|A simple selection of 3 [[register]]s.]]</span>
A multiplxer is a device that receives multiple inputs from usually different sources. A set of select lines are then used to choose which of those inputs gets produced as output. Signals to the select lines usually come from a control unit that determines which, if any, of the signals should be routed to some destination. MUXes are core components in most digital systems as they can be used to pass the correct signal based on some conditional logic. For example, consider a [[data bus]] that is connected to [[register file|multiple]] memory [[register|storage units]]. One can use a multiplexer to select which of those lines should be going to the shared data bus.
+
A multiplxer is a device that receives multiple inputs from usually different sources. A set of select lines are then used to choose which of those inputs gets produced as output. Signals to the select lines usually come from a control unit that determins which, if any, of the signals should be routed to some destination. MUXes are core components in most digital systems as they can be used to pass the correct signal based on some conditional logic. For example, consider a [[data bus]] that is connected to [[register file|multiple]] memory [[register|storage units]]. One can use a multiplexer to select which of those lines should be going to the shared data bus.
  
=== Enable/Tri-State ===
+
=== Enable ===
It's often desirable to add an [[enable]] (or strobe) input ''EN'' to a multiplexer. An enable input makes the multiplexer operate. When ''EN = 0'', the output is [[High-Z]] or less commonly [[LOW]] (depending on the specific device). When ''EN = 1'', the multiplexer performs its operation depending on the selection line.
+
It's often desirable to add an [[enable]] (or strobe) input ''EN'' to a multiplexer. An enable input makes the multiplexer operate. When ''EN = 0'', the output is either [[LOW]] or [[High-Z]] (depending on the specific device). When ''EN = 1'', the multiplexer performs its operation depending on the selection line.
 
 
'''Tri-state multiplexers''' are MUXes that do not force a [[LOW]] when enable is 0 but instead go into a [[High-Z]] state. Those types of multiplexers can be hooked up directly to a shared bus ensuring that only one signal is being generated on the bus at any given time.
 
  
 
== Design ==
 
== Design ==
Line 27: Line 25:
 
For 2, 4, and 8-input multiplexers the equations are thus:
 
For 2, 4, and 8-input multiplexers the equations are thus:
  
:<math>
+
:<math>\text{MUX21}(a, b) = (A\overline{S_0})+(BS_0)</math>
\begin{align}
+
:<math>\text{MUX41}(a, b, c, d) = (A\overline{S_0 S_1})+(B\overline{S_0}S_1)+(C S_0\overline{S_1})+(D S_0 S_1)</math>
\text{MUX21}(a, b)               &= (A\overline{S_0})+(BS_0) \\
+
:<math>\text{MUX81}(a, b, c, d, e, f, g) = (A\overline{S_0 S_1 S_2})+(B\overline{S_0 S_1}S_2)+(C \overline{S_0} S_1 \overline{S_2})+(D \overline{S_0} S_1 S_2)+(E S_0 \overline{S_1 S_2})+(F S_0 S_1 \overline{S_2})+(G S_0 S_1 S_2)</math>
\text{MUX41}(a, b, c, d)         &= (A\overline{S_0 S_1})+(B\overline{S_0}S_1)+(C S_0\overline{S_1})+(D S_0 S_1) \\
 
\text{MUX81}(a, b, c, d, e, f, g) &= (A\overline{S_0 S_1 S_2})+(B\overline{S_0 S_1}S_2)+(C \overline{S_0} S_1 \overline{S_2})+(D \overline{S_0} S_1 S_2)+(E S_0 \overline{S_1 S_2})+(F S_0 S_1 \overline{S_2})+(G S_0 S_1 S_2)
 
\end{align}
 
</math>
 
 
{{clear}}
 
{{clear}}
 
 
== Implementations ==
 
== Implementations ==
 
Many different variations of multiplexers exist. Typically larger multiplxers (over 8 or 16 inputs) are built using smaller multiplxers using a [[/tree|multiplexer tree]].
 
Many different variations of multiplexers exist. Typically larger multiplxers (over 8 or 16 inputs) are built using smaller multiplxers using a [[/tree|multiplexer tree]].
Line 41: Line 34:
 
=== 2:1 MUX (MUX21) ===
 
=== 2:1 MUX (MUX21) ===
 
{| class="wikitable" style="float: right;"
 
{| class="wikitable" style="float: right;"
! colspan="4" | 2:1 Mux
+
! style="width:20em;" colspan="4" | 2:1 Mux
 
|-
 
|-
 
! Sel !! A !! B !! Q
 
! Sel !! A !! B !! Q
Line 54: Line 47:
 
|}
 
|}
 
[[File:Mux_2_1_equivalence.svg|left|200px]]
 
[[File:Mux_2_1_equivalence.svg|left|200px]]
[[File:mux21 k-map.svg|left|200px|thumb|A [[K-Map]] of a 2:1 Multiplexer.]]
+
The simplest multiplexer is the '''2:1 MUX''' (or '''MUX21''') which simply selects its output from just two possible inputs. Its selection lines is therefore made of a [[bit|single bit]]. A [[truth table]] is provided on the right. The logic function of a 2:1 Mux is:
The simplest multiplexer is the '''2:1 MUX''' (or '''MUX21''') which simply selects its output from just two possible inputs. Its selection lines is therefore made of a [[bit|single bit]]. A [[truth table]] is provided on the right.
 
 
 
 
 
The [[K-Map]] for that truth table is provided on the left. From there the [[sum of minterms]] and the [[logic function]] for a 2:1 MUX can be derived.
 
 
 
  
:<math>\sum m(3,4,6,7) = (A \land \overline{S}) \lor (B \land S)</math>
+
:<math>Q = (A \land \overline{S_0}) \lor (B \land S_0)</math>
{{clear}}
 
  
 
====CMOS====
 
====CMOS====
A very fast and compact, [[CMOS]]-based [[pass-transistor logic|PTL logic]], 2:1 MUX device can be built using two [[transmission gate]]s as shown below. The top transmission gate controls if the input from ''A'' should pass to the output while the bottom transmission gate does the same for the ''B'' input. A single [[inverter]] is used to invert the selection line value to one of the gates so that only one of them (e.i. input A or input B) is allowed to pass. While smaller overall, this multiplexer is also [[nonrestoring]].
+
A very fast and compact, [[CMOS]]-based [[pass-transistor logic|PTL logic]], 2:1 MUX device can be built using two [[transmission gate]]s as shown below. While smaller overall, this multiplexer is also [[nonrestoring]].
  
{|
+
{| class="center"
| [[File:MUX21 using transmission gates.svg|200px]] || style="padding-left: 50px;" | [[File:MUX21 using cmos tranmission.svg|200px]]
+
| [[File:MUX21 using transmission gates.svg|200px]]
 +
|[[File:Transmission gate 2 1 mux.png|200px]]
 
|}
 
|}
 
{{expand section}}
 
A 2:1 MUX can also be built using an [[AOI222]] gate.
 
 
{{clear}}
 
{{clear}}
 
=== 3:1 MUX ===
 
{{empty section}}
 
  
 
=== 4:1 Mux ===
 
=== 4:1 Mux ===
Line 82: Line 64:
 
|+ 4:1 Mux  
 
|+ 4:1 Mux  
 
|-
 
|-
! Sel<1> !! Sel<0> !! I<0> !! I<1> !! I<2> !! I<3> !! Q
+
! Sel<0> !! Sel<1> !! I<0> !! I<1> !! I<2> !! I<3> !! Q
 
|-
 
|-
 
| 0 || 0 || 0 || X || X || X || 0
 
| 0 || 0 || 0 || X || X || X || 0
Line 95: Line 77:
 
|-
 
|-
 
| 1 || 0 || X || X || 1 || X || 1
 
| 1 || 0 || X || X || 1 || X || 1
 +
|-
 +
| 1 || 1 || X || X || X || 1 || 1
 
|-
 
|-
 
| 1 || 1 || X || X || X || 0 || 0
 
| 1 || 1 || X || X || X || 0 || 0
|-
 
| 1 || 1 || X || X || X || 1 || 1
 
 
|}
 
|}
 
A '''4:1''' Multiplexer is a common multiplexer that takes selects one input among 4 and connects it to its output based on a 2-bit select line. There are many way to construct a 4:1 Mux, one possibility is using 2:1 Mux as shown below:
 
A '''4:1''' Multiplexer is a common multiplexer that takes selects one input among 4 and connects it to its output based on a 2-bit select line. There are many way to construct a 4:1 Mux, one possibility is using 2:1 Mux as shown below:
Line 106: Line 88:
 
Alternatively, a 4:1 Mux can be built out of basic gates. Its function is shown below:
 
Alternatively, a 4:1 Mux can be built out of basic gates. Its function is shown below:
  
Q = <math>(A \land \overline S_0 \land \overline S_1) \lor (B \land S_0 \land\overline S_1) \lor (C \land\overline S_0 \land S_1) \lor (D  \land S_0 \land S_1)</math>
+
Q = <math>(A \land \overline S_0 \land \overline S_1) \lor (B \land \overline S_0 \land S_1) \lor (C \land S_0 \land \overline S_1) \lor (D  \land S_0 \land S_1)</math>
  
 
Where A, B, C, and D are the four inputs. Q is the output.
 
Where A, B, C, and D are the four inputs. Q is the output.
  
====CMOS====
+
=== Larger Multiplexers ===
{{empty section}}
 
 
 
=== 8:1 MUX ===
 
{{empty section}}
 
 
 
=== Large Multiplexers ===
 
{{main|/tree|l1=Multiplexer Tree}}
 
 
Multiplexers generally only come in a few common sizes. Even in [[ASIC]] design, arbitrary sized multiplexers are not always offered. Large multiplexers can always be built from a collection of smaller ones. Consider a [[register file]] with 32 registers where we only want to select a single register at any given time. Such multiplexer can be design from four 8:1 Mux.
 
Multiplexers generally only come in a few common sizes. Even in [[ASIC]] design, arbitrary sized multiplexers are not always offered. Large multiplexers can always be built from a collection of smaller ones. Consider a [[register file]] with 32 registers where we only want to select a single register at any given time. Such multiplexer can be design from four 8:1 Mux.
 
== Discrete Chips ==
 
Various multiplexers are available in discrete chips as well for both [[7400 series]] and [[4000 series]].
 
 
=== [[7400 series]] chips ===
 
{| class="wikitable sortable"
 
! Device Number !! Name !! Description
 
|-
 
| {{74s|74150}}  || 16:1 MUX    || Output is inverted input
 
|-
 
| {{74s|74151}}  || 8:1 MUX      || Output is inverted input
 
|-
 
| {{74s|74151A}} || 8:1 MUX      || Output is inverted input
 
|-
 
| {{74s|74152}}  || 8:1 MUX      || Complementary outputs
 
|-
 
| {{74s|74153}}  || Dual 4:1 MUX || Output same as input
 
|-
 
| {{74s|74157}}  || Quad 2:1 MUX || Output same as input
 
|-
 
| {{74s|74158}}  || Quad 2:1 MUX || Output is inverted input
 
|-
 
| {{74s|74257}}  || Quad 2:1 MUX || Output same as input, High-Z Enable
 
|-
 
| {{74s|74298}}  || Quad 2:1 MUX with Register || MUX with an [[SR latch]]
 
|-
 
| {{74s|74399}}  || Quad 2:1 MUX with Register || MUX with an [[SR latch]]
 
|-
 
| {{74s|74398}}  || Quad 2:1 MUX with Register || MUX with an [[SR latch]] / Complementary outputs
 
|-
 
|}
 
 
=== [[4000 series]] chips ===
 
{| class="wikitable sortable"
 
! Device Number !! Name !! Description
 
|-
 
| {{40s|4512}}  || 8:1 MUX with EN    || Output same as input, [[High-Z]] Enable
 
|-
 
| {{40s|4514}}  || 16:1 MUX with EN/Register || Output same as input
 
|-
 
| {{40s|4515}}  || 16:1 MUX with EN/Register || Output is inverted input
 
|-
 
| {{40s|4539}}  || Dual 4:1 MUX              || Output same as input
 
|-
 
| {{40s|40257}} || Quad 2:1 MUX with EN      || Complementary outputs, [[High-Z]] Enable
 
|}
 
  
 
==== 74151 - 8:1 Mux ====
 
==== 74151 - 8:1 Mux ====
Line 203: Line 132:
 
[[File:74151.svg|left|thumb|300px|74151 IC 8:1 MUX]]
 
[[File:74151.svg|left|thumb|300px|74151 IC 8:1 MUX]]
 
{{clear}}
 
{{clear}}
 +
 +
== Tri-State Outputs ==
 +
Some commercial multiplexers have tri-state outputs. When the EN input is LOW, instead of the output being forced into 0, it gets forced into a Hi-Z state.
  
 
== See also ==
 
== See also ==
 
* [[choose function]]
 
* [[choose function]]
* [[adders]]
 
** [[multiplexer adder]]
 
** [[carry-select adder]]
 
  
 
[[Category:Logic gates]]
 
[[Category:Logic gates]]

Please note that all contributions to WikiChip may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see WikiChip:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)