1 00:00:00,890 --> 00:00:04,720 The truth table we've been using as an example describes a very useful 2 00:00:04,720 --> 00:00:08,090 combinational device called a 2-to-1 multiplexer. 3 00:00:08,090 --> 00:00:13,080 A multiplexer, or MUX for short, selects one of its two input values 4 00:00:13,080 --> 00:00:14,870 as the output value. 5 00:00:14,870 --> 00:00:19,189 When the select input, marked with an S in the diagram, is 0, the 6 00:00:19,189 --> 00:00:23,769 value on data input D0 becomes the value of the Y output. 7 00:00:23,769 --> 00:00:28,220 When S is 1, the value of data input D1 is selected as the Y output 8 00:00:28,220 --> 00:00:30,380 value. 9 00:00:30,380 --> 00:00:34,430 MUXes come in many sizes, depending on the number of select inputs. 10 00:00:34,430 --> 00:00:39,120 A MUX with K select inputs will choose between the values of 2^K data 11 00:00:39,120 --> 00:00:40,120 inputs. 12 00:00:40,120 --> 00:00:44,850 For example, here's a 4-to-1 multiplexer with 4 data inputs and 2 13 00:00:44,850 --> 00:00:46,769 select inputs. 14 00:00:46,769 --> 00:00:53,060 Larger MUXes can be built from a tree of 2-to-1 MUXes, as shown here. 15 00:00:53,060 --> 00:00:55,519 Why are MUXes interesting? 16 00:00:55,519 --> 00:00:58,980 One answer is that they provide a very elegant and general way of 17 00:00:58,980 --> 00:01:01,289 implementing a logic function. 18 00:01:01,289 --> 00:01:04,360 Consider the 8-to-1 MUX shown on the right. 19 00:01:04,360 --> 00:01:08,890 The 3 inputs — A, B, and CIN — are used as the three select signals 20 00:01:08,890 --> 00:01:09,890 for the MUX. 21 00:01:09,890 --> 00:01:13,810 Think of the three inputs as forming a 3-bit binary number. 22 00:01:13,810 --> 00:01:18,360 For example, when they're all 0, the MUX will select data input 0, and 23 00:01:18,360 --> 00:01:23,908 when they're all 1, the MUX will select data input 7, and so on. 24 00:01:23,908 --> 00:01:26,960 How does make it easy to implement the logic function shown in the 25 00:01:26,960 --> 00:01:27,970 truth table? 26 00:01:27,970 --> 00:01:32,750 Well, we'll wire up the data inputs of the MUX to the constant values 27 00:01:32,750 --> 00:01:36,539 shown in the output column in the truth table. 28 00:01:36,539 --> 00:01:40,420 The values on the A, B and CIN inputs will cause the MUX to select the 29 00:01:40,420 --> 00:01:46,600 appropriate constant on the data inputs as the value for the COUT output. 30 00:01:46,600 --> 00:01:49,880 If later on we change the truth table, we don't have to redesign some 31 00:01:49,890 --> 00:01:53,360 complicated sum-of-products circuit, we simply have to change the 32 00:01:53,360 --> 00:01:56,000 constants on the data inputs. 33 00:01:56,000 --> 00:01:59,600 Think of the MUX as a table-lookup device that can be reprogrammed to 34 00:01:59,600 --> 00:02:03,789 implement, in this case, any three-input equation. 35 00:02:03,789 --> 00:02:06,820 This sort of circuit can be used to create various forms of 36 00:02:06,820 --> 00:02:10,139 programmable logic, where the functionality of the integrated circuit 37 00:02:10,139 --> 00:02:13,950 isn't determined at the time of manufacture, but is set during a 38 00:02:13,950 --> 00:02:18,180 programming step performed by the user at some later time. 39 00:02:18,180 --> 00:02:21,209 Modern programmable logic circuits can be programmed to replace 40 00:02:21,209 --> 00:02:23,570 millions of logic gates. 41 00:02:23,570 --> 00:02:26,660 Very handy for prototyping digital systems before committing to the 42 00:02:26,660 --> 00:02:32,640 expense of a custom integrated circuit implementation. 43 00:02:32,640 --> 00:02:37,210 So MUXes with N select lines are effectively stand-ins for N-input 44 00:02:37,210 --> 00:02:38,959 logic circuits. 45 00:02:38,959 --> 00:02:42,540 Such a MUX would have 2^N data inputs. 46 00:02:42,540 --> 00:02:47,160 They're useful for N up to 5 or 6, but for functions with more inputs, 47 00:02:47,160 --> 00:02:51,250 the exponential growth in circuit size makes them impractical. 48 00:02:51,250 --> 00:02:54,920 Not surprisingly, MUXes are universal as shown by these MUX-based 49 00:02:54,920 --> 00:02:58,989 implementations for the sum-of-products building blocks. 50 00:02:58,989 --> 00:03:02,959 There is some speculation that in molecular-scale logic technologies, 51 00:03:02,959 --> 00:03:06,440 MUXes may be the natural gate, so it's good to know they can be used 52 00:03:06,440 --> 00:03:08,709 to implement any logic function. 53 00:03:08,709 --> 00:03:13,920 Even XOR is simple to implement using only 2-to-1 MUXes!