CSE231 – Digital Logic Design
Lecture – 7 Lesson Outcomes
v
After completing this lecture, students will be able to
Shift
• Identify the basic forms of data movement in shift
registers
• Explain how serial in/serial out, serial in/parallel out,
parallel in/serial out, and parallel in/parallel out shift
Registers
registers operate
• Describe how a bidirectional shift register
• Use a shift register as a counter
• Use a shift register as a time-delay device
CSE231 Lecture 7 Page 1/25
Key Terms
BIDIRECTIONAL Having two directions. In a bidirectional shift register,
the stored data can be shifted right or left.
LOAD To enter data into a shift register.
REGISTER One or more flip-flops used to store and shift data.
STAGE One storage element in a register.
CSE231 Lecture 7 Page 2/25
Register
A register is a digital circuit with two basic functions: data storage and data
movement. The storage capability of a register makes it an important type of
memory device.
The storage capacity of a register is the total number of bits (1s and 0s) of digital
data it can retain. Each stage (flip-flop) in a shift register represents one bit of
storage capacity; therefore, the number of stages in a register determines its storage
capacity.
The shift capability of a register permits the movement of data from stage to stage
within the register or into or out of the register upon application of clock pulses.
There are four types of shift registers based on data input and output
(inputs/outputs): serial in/serial out, serial in/parallel out, parallel in/serial out, and
parallel in/parallel out.
CSE231 Lecture 7 Page 3/25
Shift Register Operation
When 1 is applied to the data input as shown, and a clock pulse is applied that
stores the 1 by setting the flip-flop. When the 1 on the input is removed, the flip-
flop remains in the SET state, thereby storing the 1. A similar procedure applies to
the storage of a 0 by resetting the flip-flop.
CSE231 Lecture 7 Page 4/25
Data movement in shift register
CSE231 Lecture 7 Page 5/25
Serial in / Serial out shift register
CSE231 Lecture 7 Page 6/25
Example
PROBLEM. Show the states of the
5-bit register in Figure (a) for the
specified data input and clock
waveforms. Assume that the
register is initially cleared (all 0s).
CSE231 Lecture 7 Page 7/25
Serial in parallel out register
CSE231 Lecture 7 Page 8/25
74HC164 8-bit serial in/parallel out shift register
CSE231 Lecture 7 Page 9/25
Parallel in serial out register
CSE231 Lecture 7 Page 10/25
Example
CSE231 Lecture 7 Page 11/25
74HC165 8-bit parallel load shift register
CSE231 Lecture 7 Page 12/25
Parallel in parallel out register
CSE231 Lecture 7 Page 13/25
Timing diagram for a 74HC195 shift register
CSE231 Lecture 7 Page 14/25
Bidirectional shift register
A bidirectional shift register is one in which the data can be shifted either left or right. It
can be implemented by using gating logic that enables the transfer of a data bit from one
stage to the next stage to the right or to the left, depending on the level of a control line.
CSE231 Lecture 7 Page 15/25
Example
CSE231 Lecture 7 Page 16/25
Shift register application – Johnson counter
CSE231 Lecture 7 Page 17/25
Shift register application – Johnson counter
CSE231 Lecture 7 Page 18/25
Shift register application – ring counter
Initially, a 1 is preset into the first flip-flop, and the rest of the flip-flops are cleared.
The ten outputs of the counter indicate directly the decimal count of the clock pulse. For instance, a 1 on
Q0 represents a zero, a 1 on Q1 represents a one, a 1 on Q2 represents a two, a 1 on Q3 represents a
three, and so on. You should verify for yourself that the 1 is always retained in the counter and simply
shifted “around the ring,” advancing one stage for each clock pulse.
CSE231 Lecture 7 Page 19/25
Shift register application – ring counter
CSE231 Lecture 7 Page 20/25
Shift register application – Johnson counter
PROB. If a 10-bit
ring counter has
the initial state
1010000000,
determine the
waveform for
each of the Q
outputs.
CSE231 Lecture 7 Page 21/25
Shift register application – time delay
CSE231 Lecture 7 Page 22/25
Shift register application – time delay
CSE231 Lecture 7 Page 23/25
References
1. Digital Fundamentals by Thomas Floyd, Pearson International Edition,
11th Edition, Chapter 8, Page 449-495.
CSE231 Lecture 7 Page 24/25
Next class
Counters
CSE231 Lecture 7 Page 25/25