 # WEEK EMT 1253 DIGITAL ELECTRONIC PRINCIPLES I COMBINATIONAL

• Slides: 23 WEEK EMT 125/3 DIGITAL ELECTRONIC PRINCIPLES I COMBINATIONAL LOGIC FUNCTIONS MUX & DEMUX SITI ZARINA BINTI MD NAZIRI | SCHOOL OF MICROELECTRONIC ENGINEERING | Uni. MAP Multiplexers (MUX) § MUX is a device that allows digital information from several sources to be routed onto a single line for transmission. § It is made up of several data -input lines and a single output line. It also has data -select inputs which permits digital data on any one of the inputs to be switched to the output line. § MUX is also known as data selectors. n select inputs 1 data output 2 n data inputs Logic symbol for a 4 -input multiplexer (4: 1 MUX) Multiplexers (MUX) § SELECT input code determines which input is transmitted to output Z. Multiplexers (MUX) 1 -of-4 MUX (4: 1) 2 data-select lines means that any one of the 4 datainput lines can be selected D 0 D 1 D 2 D 0 D 1 D 3 S 1 4 -to-1 Z D 2 MUX S 0 S 1 S 0 DATA-SELECT INPUTS Z INPUT SELECTED S 1 S 0 0 0 D 0 0 1 D 1 1 0 D 2 1 1 D 3 If a binary 0 (S 0=0 and S 1=0) is applied to the data-select lines, the data on input D 0 appear on the data-output line. Multiplexers (MUX) 1 -of-4 MUX (4: 1) Total expression for the data output is: Logic diagram for 1 -of-4 MUX Multiplexers (MUX) Another example of 1 -of-2 MUX (2: 1) Logic circuit Truth-table Multiplexers (MUX) Question Construct an (1 -of-8) 8: 1 multiplexer. 8 input lines means there must be 3 data select lines. MUX – Function Implementation Implementing a Boolean Function with a MUX § A multiplexer is basically a decoder that includes the OR § gate within the block. To implement a Boolean function of n variables with a mux having n selection inputs and 2 n data inputs, one for each minterm. § The minterms are generated in a mux by the circuit associated with the selection inputs. § Individual minterms can be selected by the data inputs. MUX – Function Implementation Question Implement the logic function, F = ∑m (1, 3, 5, 6) using an 1 -of-8 (8: 1) multiplexer. Note: All input ‘ 1’s are connected to voltage source (+5 V), and ‘ 0’s to GND 0 0 1 1 0 2 0 3 0 4 1 5 1 6 0 7 F 2 1 0 S 2 S 1 S 0 8 input lines means there must be 3 data select lines. MUX – Function Implementation Implementing a Boolean Function with a MUX Ü Another method (more efficient way) Ü Implementing a Boolean function of n variables with a multiplexer having only n-1 selection inputs and 2 n-1 data inputs. MUX – Function Implementation General procedure: 1. Produce Truth Table for Boolean function. 2. The first n-1 variables are applied to the selection inputs of 3. 4. 5. the mux. The remaining single variable of the function is used for the data input. For each combination of the selection variables, we evaluate the output as a function of the single last variable, i. e. a 0, 1, the variable or its complement. These values are then applied to the data inputs in the proper order. MUX – Function Implementation Example Implement F (X, Y, Z) = m (1, 2, 6, 7) using 4: 1 MUX MUX – Function Implementation Example Implement F (A, B, C, D) = m (1, 3, 4, 11, 12, 13, 14, 15) using 1 -of-8 MUX (8: 1) MUX – Implementation Option Design option for 1 -of-8 mux Ü Construction of larger multiplexers using smaller ones. 16 -to-1 MUX: 74150 MUX – Implementation Option 1 -of-8 Line Mux MUX – Implementation Option 1 -of-16 Line Mux Using 1 -of-8 Line Mux Demultiplexers (DEMUX) § DEMUX reverse the multiplexing functions § It takes digital information from one line and distributes it to a given number of output lines § DEMUX is also known as data distributor 1 data input n select inputs 2 n data outputs 1 -line to 4 -line DEMUX S 1 S 0 DI D 3 D 2 D 1 D 0 X X 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 0 0 Data input is transmitted to only one of the outputs as determined by the select input code. 1 -line-to-8 -line demultiplexer Demultiplexers (DEMUX) 1: 4 DEMUX Demultiplexers (DEMUX) Question Construct a 1: 4 DEMUX using block diagram. Show the equivalent Truth-Table. I 0 1 -4 DEMUX Q 0 Q 1 Q 2 Q 3 S 0 S 1 S 0 I 0 Q 3 Q 2 Q 1 Q 0 X X 0 0 0 0 1 1 0 0 1 0 Q 2 1 0 1 0 0 Q 3 1 1 0 0 0 S 1 S 0 Block diagram S 1 Truth-table I 0 Q 1 Logic circuit Decoder/Demultiplexer § Do you notice that the decoder can function as a demultiplexer if the: a) input to the enable line of the decoder is taken as the data input line of the multiplexer and b) the input lines of the decoder are taken as the selection lines of the demultiplexer? Solve this. . Design the following: § 16 -line-to-4 -line encoder using the 8 -line-to-3§ § line encoder in cascade A 4: 1 MUX using 2: 1 MUXes A 8: 1 MUX using 4: 1 MUXes A 1: 4 De. MUX using 1: 2 De. MUX A 1: 8 De. MUX using 1: 4 De. MUX Mux-Demux Application: Example § This enables sharing a single communication line among a number of devices. § At any time, only one source and one destination can use the communication line. E D N