Professional Documents
Culture Documents
By
Mrs P SRIVANI
Assistant Professor, ECE Dept
SHIFT REGISTERS
Q
SHIFT REGISTERS
• number of
One D FF is used to store 1-bit of data. Thus, the
flip-flops used is the same with the number of bit
stored.
• Shift register mean that the data in each FF can be
transferred/move to other FF upon edge
triggering of the clock signal.
Four types of data movement in shift register are:-
• a) SISO-Serial In Serial Out
• b)SIPO- Serial In Parallel Out
• c)PISO-Parallel In Serial Out
• d)PIPO-Parallel In Parallel Out
SHIFT REGISTERS
Data in
Data in Data out
Data out
(a) Serial in/shift right/serial out
(b) Serial in/parallel out
SIPO
SISO
2.Parallel load register:
PISO
Data in
Data out
Data in
PIPO
Data out
DIN
D Q0 D Q1 D Q2 D Q3
CLK CP CP CP CP
D0 D1 D2 D3
D Q D Q D Q D Q
C C C C
CLK
Q0 Q1 Q2 Q3
Serial
data
out
D Q0 D Q1 D Q2 D Q3
CLK CP CP CP CP
A4 A3 A2 A1
Q Q Q Q
Clear D D D D
CLK
Serial
input for Serial
shift-right input for
I4 I3 I2 I1 shift-left
Parallel inputs
A bidirectional shift register. Capable of shifting contents either left or right depending upon the signals
present on appropriate control input lines.
Universal shift register: Depending on the signal values on the select lines of the multiplexers, the
register can retain its current state, shift right, shift left or be loaded in parallel. Each operation is the
result of a positive edge on the clock line.
4-bit Universal shift register selection modes.
Mode Control
s1 s0 Register Operation
0 0 No change
0 1 Shift right
1 0 Shift left
1 1 Parallel load
APPLICATIONS
• Ring counter
Counters are sequential logic devices that are activated or triggered by an external timing pulse
or clock signal.
Synchronous Asynchronous
independent of the
all the data bits input clock so the
change data bits change
synchronously with state at different
the application of times one after the
a clock signal other
COUNTERS
Notes :
To operate the toggle mode , the FFs must be connected with J=K=1
Remember that the FFs are connected in series in Asynchronous systems.
4-bitBinary Ripple Counter
(ASYNCHRONOUS COUNTER):
Binary counter : Group of FFs connected in a special
arrangement in which the states of FF represent the binary
number equivalent to the number of pulses that have
occurred at the input of the counter.
Binary Ripple counter is called also, a Mod-X counter, where X is the number
of counter states and its equal to 2n , for n FFs .
The first FF in the counter is called LSB , and the last FF is called MSB.
The output of MSB divides the input clock frequency by X
The figure below shows a 4-bit binary counter (Mod-16) :
1. The clock pulse applied only to the Clk input of flip flop A.
2. The input for each of the next FFs is the output of the previous FF. So the
output of FF A is the input of FF B , the output of FF B is the input of FF C
, and the output of FF C is the input of FF D.
3. FF A will toggle each time the clock pulse make a transition.
4. Since The output of FF A is the input of FF B ,FF B will toggle each time
the output of FF A goes from 1 to 0 , and so on.
LOGIC DIAGRAM
5. This means only FF A responds to the clock
pulses. FF B has to wait for FF A to change states Truth table for 4-bit binary counter
before its toggled , and so on.
1 1 1 1 1 1 1 1
Q 0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 1
Q 0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 1
Q 0 0 0 0 0
0 0 0
1 1 1 1 1 1 1 1
Q 0 0 0 0 0 0 0 0
DETERMINING THE MODULUS OF COUNTER :
• Mod counters are defined based on the number of states that the counter will
sequence through before returning back to its original value
• For example, a 2-bit counter that counts from 002 to 112 in binary,has a modulus value
of 4 ( 00 → 01 → 10 → 11 , return back to 00 ) so would therefore be called a modulo-
4,. Note also that it has taken 4 clock pulses to get from 00 to 11.
• The maximum number of possible output states (maximum modulus) for the
counter is: 2n
• Therefore, a “mod-n” counter will require “n” number of flip-flops connected together
to count a single data bit while providing 2n different output states
2
3
Example :
24
General procedure to design a Mod-X counter ( or a X-bit
binary ripple counter) :
State Diagram
Example :
23 = 8 , 24 = 16 .
Thus, the number of FFs we have to use are
4 FFs.
Connect the FFs as a counter
Mod-16 counter
A B C D
DCBA
0000
Connect the NAND gate to the asynchronous Clear inputs of all FFs.
Mod-10 counter will count from 0000 through 1001. 0001
0010
So, it must be rest to 0000 state when the count of 1010 is reached.
0011
Therefore, FF outputs B and D must be connected as the NAND gate inputs.
0100
In other words , the NAND gate will go low when B=D=1 (1010 state), thin 0101
the low at NAND output will immediately clear the counter to 0000 state.
0110
0111
1000
1001
1010
Mod-10 counter
2.SYNCHRONOUS (PARALLEL) COUNTER :
•All the individual output bits changing state at exactly the same
time in response to the common clock signal with no ripple effect
and therefore, no propagation delay.
A0 J A1
00 01 J Q Q
C C
Q' K Q'
K
11 10
CLK
•And the additional AND gates generate the required logic for the JK
inputs of the next stage.
Timing diagram of 4-bit synchronous up counter
Truth table of 4-bit synchronous up counter
4-BIT SYNCHRONOUS DOWN COUNTER
It is obtained by connecting the AND gates to the Q
output of the flip-flops.
SYNCHRONOUS BIDIRECTIONAL COUNTER :
The figure below shows a parallel up/down counter .
The control input up/down controls whether the normal FF outputs or the
inverted once, are fed to the J&K /(T) input of the successive FFs.
Timing diagram of 4-bit synchronous up & down counter
Mealy and Moore models
The Mealy model: The outputs are functions of
both the present state and inputs
The outputs may change if the inputs change during
the clock pulse period
The outputs may have momentary false values unless the inputs
are synchronized with the clocks
The Moore model: The outputs are functions of
the present state only
The outputs are synchronous with the clocks
State Reduction and Assignment
State Reduction
reductions on the number
of flip-flops and the
number of gates
a reduction in the number
of states may result in a
reduction in the number of
flip-flops
a example state diagram
only the input-output sequences
are important
two circuits are equivalent
have identical outputs for all input
sequences
The number of states is not important
Synchronous
Sequential Logic
Equivalent states
-51
Reducing the state table
e=f
d=?
The reduced finite state machine
The checking of each pair of states for
possible equivalence can be done
systematically
The unused states are treated as don't-care
condition fewer combinational gates
State assignment
To minimize the cost of the combinational
circuits
Three possible binary state assignments
Any binary number assignment is satisfactory
as long as each state is assigned a unique
number
use binary assignment 1