Professional Documents
Culture Documents
REGISTERS
• A register is a digital circuit with two basic
functions: Data Storage and Data Shifting
– A shift register provides the data movement function
– A shift register “shifts” its output once every clock
cycle
3
Data Shifting
• Block diagrams for shift registers with various
input/output options:
n-bit shift
register n-bit shift
register
n-bit shift
register n-bit shift
register
4
Shift Register Characteristics
• Direction
– Left shift
– Right shift
– Rotate (right or left)
– Bidirectional
• Types n-bit shift
register
– Serial-in, Serial-out
– Serial-in, Parallel-out
– Parallel-in, Serial-out
– Parallel-in, Parallel-out
– Universal
5
Serial-In Serial-Out
n-bit shift
register
6
Serial-In Serial-Out
7
Serial-In Serial-Out
8
Serial-to-Parallel Conversion
n-bit shift
register
9
Parallel-to-Serial Conversion
10
Parallel-to-Serial Conversion
Parallel-to-Serial Conversion
PARALLEL Shift/load’ CLK (QA QB QC QD) SERIAL DATA
DATA IN OUT
ABCD (WHEN
SHIFT=1)
0000 0
0101 0 1 0101 1(MSB)
1 2 0010 0
1 3 0001 1
1 4 0000 0(LSB)
0000 0
1101 0 5 1101 1(MSB)
1 6 1110 0
1 7 1111 1
1 8 1111 1(LSB)
Parallel-In Parallel-Out
13
Bidirectional Shift Registers
Universal Shift Register
A B C D
LIN
RIN
S1 I3 I2 I1 I0 I3 I2 I1 I0 I3 I2 I1 I0 I3 I2 I1 I0
S0
D Q D Q D Q D Q
A B C D
C C C C
CLR CLR CLR CLR
CK
CLR_L
QA QB QC QD
15
Ring Counter
Johnson Counters
COUNTERS
ASYNCHRONOUS SYNCHRONOUS
Flip-flops are connected in such a No connection between output of
way that output of first flip-flop first flip-flop and clock input of next
drives the clock for the next flip-flop. flip-flop.
All the flip-flops are not clocked All the flip-flops are clocked
simultaneously. simultaneously.
Logic circuit is simple even for more Design involves complex logic circuit
number of states. as number of states increases.
Qn Qn+1 J K
0 0 0 X
FLIP-FLOP INPUTS:
0 1 1 X
J2 = K2 = Q1.Q0
1 0 X 1
1 1 X 0 J1 = K1 = Q0
J0 = K0 = 1
3-bit synchronous UP counter.
Timing diagram for the SYNCHRONOUS UP COUNTER
27