Multiplexers which sometimes are simply called Muxor Muxes, are devices that act like a very fast acting rotary switch. They connect multiple input lines 2, 4, 8, 16 etc one at a time to a common output line and are used as one method of reducing the number of logic gates required in a circuit. Multiplexers are individual Analogue Switches as opposed to the mechanical types such as normal conventional switches and relays. They are usually made from MOSFETs devices encased in a single package and are controlled using standard logic gates.
A multiplexer circuit accepts N inputs and outputs the value of one of those inputs. The selection of which goes out on the output is determined by a set of M control inputs. A multiplexer with M control inputs can steer up to 2M inputs to a single output.
The selection of the channel to be read into the output is cntrolled y supplying a specific digital word to a different set of inputs (select inputs). A typical 4 input channel (D3-D0) digital multiplexer, and its corresponding truth table is shown here:
The active input channel is selected by supplying the appropriate code to select inputs (C1,C0).
// Lab
Build a 1-bit adder using 2 4-1 MUXes.
Here is a block diagram:
The
adder has three inputs and two outputs. This
means that one must generate two
different K-maps, one for each output. Here
are the functions each line performs:
A,B - The two numbers to be added
K- Carry-in
C- Carry-out
S- Sum
Using the truth table, generate two K-maps; one K-map for the Sum, and one for the carry.
Note that the Sum is A when B and K are both true and false.
The Sum is the complement of A when B or K is true, but not both.
If you tie B to S1 and K to S2, then you can tie A to input lines 0 and 3 (00,11). Then tie the complement of A to input lines 1 and 2 (01, 10).
When B and K are both false, the output is false. When Band K are both true, the output is true. When B or K are true, but not both, the output is A.
The Carry circuit:
If you apply B to S1 and K to S2, you can generate the correct Carry-Out by tying input line 0 to ground, input 3 to Vcc, and both input lines 1 and 2 to A.
To add bigger numbers, cascade several binary adders to produce the sum.The logic diagram of a 4-1 MUX
Build a Subtractor
The subtractor will work on two one-bit numbers X and Y.
Here is a truth table:
XYb
D
B
000
0
0
001
1
1
010
1
1
011
0
1
100
1
0
101
0
0
110
0
0
111
1
1
A subtractor has three inputs and two outputs. This means that you must generate two different K-maps, one for each output. Here are the functions each line performs.
X,Y-The two numbrs to be subtracted
b-Borrow in
B-Borrow-out
D-Difference
Source: Passafine, John and Michael Douglas, Digital Logic Design