LAB 2 Decoder and demultiplexer The basic function of a decoder is to detect the presence of a specified combination of bits(code) on its inputs and to indicate the presence of that code by a specified output level.In its general form,a decoder has n input lines to handle n bits and from one to 2"output lines to indicate the presence of one or more n-bit combinations. A demultiplexer(DEMUX)basically reverses the multiplexing function.It takes data from one line and distributes them to a given number of output lines.For this reason,the demultiplexer is also known as a data distributor.As you will learn,decoders can also be used as demultiplexers. Goal for Lab 2: Learn to obtain demultiplexers by decoders. Develop the timing diagram for a demultiplexer with specified data and data selection inputs. Experiments: DATA OUTPUTS Y1 Y2 Y3 Y4 Y5 Y6 16 1514131121110 G2A G2B G1 SELECT ENABLE t01246 同4国同团回可 74LS138 inputs Outputs Enable Select G1S1)G2(S2&S3)CA2)B(A1)A(A0) IYO Y1 Y2 Y3 Y4 Y5 Y6 Y7 X H X X X H H H H H H H X X H H H H H H H H H H H H H H L H H H H H H H H H H H H H L H H H H H H H H H H H H H H H H H H H H L H H H H H H H H H H H H=HIGH Level L=LOW Level X=Don't Care Note 1:G2=G2A G2B -3-
- 3 - LAB 2 Decoder and demultiplexer The basic function of a decoder is to detect the presence of a specified combination of bits (code) on its inputs and to indicate the presence of that code by a specified output level. In its general form, a decoder has n input lines to handle n bits and from one to 2n output lines to indicate the presence of one or more n-bit combinations. A demultiplexer (DEMUX) basically reverses the multiplexing function. It takes data from one line and distributes them to a given number of output lines. For this reason, the demultiplexer is also known as a data distributor. As you will learn, decoders can also be used as demultiplexers. Goal for Lab 2: Learn to obtain demultiplexers by decoders. Develop the timing diagram for a demultiplexer with specified data and data selection inputs. Experiments: 1. inputs Enable Select Outputs G1(S1) G2(S2&S3) C(A2) B(A1) A(A0) YO Y1 Y2 Y3 Y4 Y5 Y6 Y7 X H X X X H H H H H H H H L X X X X H H H H H H H H H L L L L L H H H H H H H H L L L H H L H H H H H H H L L H L H H L H H H H H H L L H H H H H L H H H H H L H L L H H H H L H H H H L H L H H H H H H L H H H L H H L H H H H H H L H H L H H H H H H H H H H L H HIGH Level L LOW Level X Don’t Care Note 1: G2 G2A G2B
When inputs change from 000 to 111,the outputs are shown in Truth Table 2.Connect the circuit to it. Truth Table 2 inputs outputs C B A (A2) (A1) (A0) YO YI Y2 Y3 Y4 Y5 Y6 Y7 0 0 0 0 1 1 1 1 1 1 1 0 0 1 0 1 1 1 1 1 1 0 1 0 1 0 1 1 1 1 0 1 1 1 1 0 1 1 1 1 1 0 0 1 1 1 0 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 0 (Only when S1=1,S2=0,S3=0, there are 0=A2AA,头1=A2A1A, 2=A2AA0… y,=AAA). Obtain demultiplexers by decoders Input signal:square wave,1KHz,Vp-p=5V 1.The input signal is at pin"S1".It is a square waveform,while S2S3=00 and A2A1A0=101 input signal: Then,the output signal at( Draw its waveform 2.The input signal is at pin“S2”and“S3”.It is a square waveform,while S1=land A2A1A0=010 Input signal Now,the output signal at Draw its waveform. Output signal -4-
- 4 - When inputs change from 000 to 111, the outputs are shown in Truth Table 2. Connect the circuit to it. Truth Table 2 inputs outputs C (A2) B (A1) A (A0) Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7 0 0 0 0 1 1 1 1 1 1 1 0 0 1 1 0 1 1 1 1 1 1 0 1 0 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 0 1 1 1 1 0 1 1 1 1 0 1 1 1 1 1 1 0 1 1 1 1 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 (Only when S1=1,S2=0,S3=0, there are 0 y = 2 A AA1 0 , 1 y = 2 1 A AA0 , 2 y = 2 0 AAA1 …… 7 y =AAA 210 ). Obtain demultiplexers by decoders Input signal: square wave , 1KHz ,Vp-p= 5V 1.The input signal is at pin “S1”. It is a square waveform, while S2S3=00 and A2A1A0=101 input signal : Then, the output signal at ( ) ) Draw its waveform. 2.The input signal is at pin “S2” and “S3” . It is a square waveform, while S1=1 and A2A1A0=010 Input signal: Now, the output signal at ( ) Draw its waveform. Output signal:
3.Let input signal at A2,A1A0=10,S1=1,S2=0,S3=0.Draw two output signals. Input signal (A2) Output signal 1:( Output signal 2:( 4.Let input signal at A2,A1A0=01,S1=1,S2=0,S3=0.Find two output signals Input signal :(A2) Now Output signal 1:( Output signal 2:( -5-
- 5 - 3.Let input signal at A2, A1A0=10, S1=1,S2=0,S3=0. Draw two output signals. Input signal :(A2) Output signal 1:( ) Output signal 2:( ) 4. Let input signal at A2, A1A0=01, S1=1,S2=0,S3=0. Find two output signals. Input signal :(A2) Now Output signal 1:( ) Output signal 2:( )