Professional Documents
Culture Documents
Digital applications
2nd stage
Lecture # 11
Digital applications Lecture # 11
Mod-10
➢ A logic diagram for Mod- 6 ring counter is shown in Figure below. Initially, a
1 is preset into the first flip-flop, and the rest of the flip-flops are cleared.
Notice that the interstage connections are the same as those for a Johnson
counter, except that Q rather than Q is fed back from the last stage.
➢ A logic diagram for a 10-bit ring counter is shown in Figure below. Initially, a
1 is preset into the first flip-flop, and the rest of the flip-flops are cleared.
Note:
Modified sequences can be achieved by having more than a single 1 in the counter.
Note: Initially, a 1 is preset into the first and third flip-flops, and the rest of the flip-flops are cleared.
Solution:
Example: Q0Q1Q2Q3Q4Q5Q6Q7Q8Q9
If a 10-bit ring counter has the initial state 1010000000, determine the
waveform for each of the Q outputs. Note: D flip-flop
Digital application
2nd stage
Lecture # 12
Digital applications Lecture # 12
Shift Register
➢ A shift register is a type of sequential logic circuit.
➢ The two basic functions of shift register : data storage and data
movement.
➢ The storage capacity of a register is the total number of bits (1s and 0s)
of digital data it can retain. An n-bit register consists of a group of n flip-
flops capable of storing n bits of binary information.
➢ It has one serial input, and one bit is loaded from serial input into the
register by every clock pulse.
Data input
➢ After CLK4 in the data-entry operation, the bit, 0, appears on the Q3 output.
Clarification
1 0 1 0
0 1 0 1
0
0 0 1 0 1 0
0 0 0 1 0 1 0
0 0 0 0 1 0 1 0
Solution: 1011
CLK Q0 Q1 Q2 Q3
Initial 0 0 0 0
1st CLK 1 0 0 0
2nd CLK 1 1 0 0
3rd CLK 0 1 1 0
❖ Once the data are stored, each bit appears on its respective output line,
and all bits are available simultaneously.
❖ The figure below shows a 4-bit serial in / parallel out shift register and
its logic block symbol.
CLK Q0 Q1 Q2 Q3
Initial 0 0 0 0
1st CLK 1 0 0 0
2nd CLK 1 1 0 0
3rd CLK 0 1 1 0
4th CLK 1 0 1 1
➢ After four clock pulses, the data becomes available simultaneously on the
four outputs Q0 to Q3.
➢ In a serial output shift register, clock pulses are required to read the data, but
in parallel out shift register, clock pulses are not required to read the data.
Solution:
CLK Q0 Q1 Q2 Q3
Initial 0 0 0 0
1st CLK 1 0 0 0
2nd CLK 0 1 0 0
Example 2:
Show the states of the 4-bit shift register (SRG 4) for the data input and
clock waveforms in the figure below. The register initially contains all 1s.
Solution:
Q0Q1Q2Q3
The register contains 0 1 1 0 after four clock pulses.
On clock pulse 1, the parallel data (D0D1D2D3 = 1010) are loaded into the register, making Q3
a 0. On clock pulse 2 the 1 from Q2 is shifted onto Q3; on clock pulse 3 the 0 is shifted onto
Q3; on clock pulse 4 the last data bit (1) is shifted onto Q3.
Solution:
Digital application
2nd stage
Lecture # 13
Digital applications Lecture # 13
Multiplexer (MUX)
➢ A multiplexer (Data Selectors) is a combinational logic circuit that accepts
several data inputs and selects one of them at any given time to pass on to
the output. The routing of the desired digital data input to the output is
controlled by selection inputs.
➢ If there are m selection inputs, then the number of maximum possible input
lines (N) is 2m and such multiplexer is referred to as a N-to-1 multiplexer.
Note:
N = 2m
m= log2 N
m : number of select inputs.
N: number of data inputs lines
Selection inputs
The functional diagram of a general digital multiplexer.
𝑌 = 𝐷0 𝑆ഥ + 𝐷1 𝑆
2
➢ The logic level applied to the S input determines which AND gate is enabled so
that its data input passes through the OR gate to output Y.
S1 S0
D1 0
D2 1
D3 0
0
1
The output is 0.
Solution:
Eight-to-one multiplexer (MUX) is a combinational circuit with eight input lines, I0,
I1, I2, I3, I4, I5, I6 and I7, one output line, O and three selection lines, S2, S1 and S0. On
receiving active low enable input, multiplexer is able to perform its intended function.
8-to-1 line multiplexer selects binary information present on any one of I0, I1, I2, I3, I4,
I5, I6 or I7 input line, depending upon the logic status of three selection inputs, S2, S1
and S0, and sends it to the output line, O.
Function table
❖ 7(4 + 2 + 1) 2-to-1 line MUX are required and arranged in three levels. Least
significant selection line S0 is connected to four MUX of level I. Higher
significant selection line S1 is given to MUX of level II. Most significant
selection line S2 is given to MUX of level III.
Digital applications
2nd stage
Lecture # 14
Digital applications Lecture # 14
Solution:
❖ The A, B, and C variables are connected to the selection lines of 8:1 MUX, and the inputs
of the MUX correspond to the output of truth table.
❖ Notice from the truth table that F is a 1 for the following input variable combinations:011,
100, 110, and 111. For all other combinations, F is 0.
❖ For this function to be implemented with the 8:1 MUX, the data input selected by each of
the above-mentioned combinations must be connected to a HIGH. All the other data inputs
must be connected to a LOW .
Example: Implement the logic function specified in the truth table below using
8:1 multiplexer.
Solution:
❖ The truth table is made of four variables.
❖ The A, B, and C variables are connected to the selection lines
of 8:1 MUX.
❖ It becomes possible to regroup the rows of the truth table in
pairs, with each pair being characterized by the same
combination of selection inputs.
❖ Connect the data inputs of the multiplexer to either the logic
level 1 or 0, or to the remaining variable or its complement.
Solution:
➢ If there are m selection lines, then the number of maximum possible output lines
(N) is 2m and such demultiplexer is referred to as a 1-to-N demultiplexer.
N = 2m
Selection lines
The functional diagram of a general digital demultiplexer.
➢ With S0 = 0, the input data are transferred to 𝑂0, the expression becomes
𝑂0 = 𝑰
➢ With S0 = 1, the input data are transferred to 𝑂1, the expression becomes
𝑂1 = 𝑰
➢ On receiving active low enable input, demultiplexer is able to perform its intended
function.
I
I
I
Solution:
1-to-8-line demultiplexer (DeMUX) is a combinational circuit with one input line, I, eight
output lines, O0, O1, O2, O3, O4, O5, O6 and O7 and three selection lines, S2, S1 and S0. On
receiving active low enable input, demultiplexer is able to perform its intended function. A
1-to-8-line demultiplexer places binary information available on input line, I, on any one of
O0 to O7 output lines. The output line is selected based on the logic status of the selection
inputs, S2, S1 and S0.
Function Table
Solution:
Let N = 8 (Output lines of DeMUX to be constructed) and M = 2 (Output lines
of available DeMUX).
Seven (4 + 2 + 1) 1-to-2 line DeMUX are required and arranged in three levels.
S2 S1 S0 O0 O1 O2 O3 O4 O5 O6 O7
0 0 0 I 0 0 0 0 0 0 0
0 0 1 0 I 0 0 0 0 0 0
0 1 0 0 0 I 0 0 0 0 0
0 1 1 0 0 0 I 0 0 0 0
1 0 0 0 0 0 0 I 0 0 0
1 0 1 0 0 0 0 0 I 0 0
1 1 0 0 0 0 0 0 0 I 0
1 1 1 0 0 0 0 0 0 0 I
S2 S1 S0 O0 O1 O2 O3 O4 O5 O6 O7
0 0 0 I 0 0 0 0 0 0 0
0 0 1 0 I 0 0 0 0 0 0
0 1 0 0 0 I 0 0 0 0 0
0 1 1 0 0 0 I 0 0 0 0
1 0 0 0 0 0 0 I 0 0 0
1 0 1 0 0 0 0 0 I 0 0
1 1 0 0 0 0 0 0 0 I 0
1 1 1 0 0 0 0 0 0 0 I