Professional Documents
Culture Documents
Digital Logic Design Lecture 5
Digital Logic Design Lecture 5
G. Kassahun B.
Introduction to counters and Registers
• Basic Shift Register Functions
• Types of Shift Registers
2
5. Registers and Counter
INTRODUCTION
G. Kassahun B.
• A clocked sequential circuit consists of a group of flip-flops
and combinational gates connected to form a feedback path.
• A circuit with flip-flops is considered a sequential circuit even
3
5. Registers and Counter
REGISTERS
G. Kassahun B.
• A register is a group of flip-flops, each one of which is capable
of storing one bit of information.
• An n-bit register consists of a group of n flip-flops.
4
5. Registers and Counter
REGISTER
Four bit Register TTL 74171 • Simplest registers without
G. Kassahun B.
any gates
• When CLEAR is 0 the flip
flop is resetting.
5
5. Registers and Counter
Register with parallel load
G. Kassahun B.
• The transfer of new information into a register is referred to as
loading or updating the register.
• If all the bits of the register are loaded simultaneously with a
6
5. Registers and Counter
Register with Parallel Load
• Four-bit register with parallel load
G. Kassahun B.
ECENG 3101 Lecture 5
7
5. Registers and Counter
Register with Parallel Load
• Additional gates implement 2-channel mux
G. Kassahun B.
• Data is always transfer at positive clock pulse
• When “Load-input” is “1” ,the data from inputs transfer to registers
• When “Load-input” is “0” ,the flip-flop output (present state)
8
5. Registers and Counter
Basic Shift Register Functions
• Shift registers consist of arrangements of flip-f1ops and are
G. Kassahun B.
important in applications involving the storage and transfer of
data in a digital system.
• In General, A Register is used solely for storing and shifting
9
5. Registers and Counter
Basic Shift Register Functions
• A register capable of shifting the binary information held in
G. Kassahun B.
each cell to its neighboring cell in a selected direction is called
a shift register.
• It consists of a chain of flip-flops in cascade, with the output of
10
5. Registers and Counter
Types of Shift Registers
• Serial In - Serial Out Shift Registers
G. Kassahun B.
ECENG 3101 Lecture 5
• Traditional Logic symbol
11
5. Registers and Counter
Types of Shift Registers
• Serial In - Parallel Out Shift Registers
G. Kassahun B.
ECENG 3101 Lecture 5
• Logic Symbol
12
5. Registers and Counter
Types of Shift Registers
• Parallel In – Serial Out Shift Registers
G. Kassahun B.
ECENG 3101 Lecture 5
• Traditional Logic symbol
13
5. Registers and Counter
Types of Shift Registers
• Parallel In – Parallel Out Shift Registers
G. Kassahun B.
ECENG 3101 Lecture 5
14
5. Registers and Counter
G. Kassahun B.
Application of Shift Register
Serial Transfer
• A digital system is said to operate in serial mode when information is
transferred and manipulated one bit at a time.
• Information is transferred one bit at a time by shifting the bits out of
15
5. Registers and Counter
Application of Shift Register
Serial Transfer
G. Kassahun B.
• Serial transfer from register A to register B
G. Kassahun B.
• Suppose the 4 – bit shift register and control signal that
supervises the transfer is designed in such a way that a clock
generator will produce four pulses T1 T2 T3 and T4. assuming
17
5. Registers and Counter
Serial Transfer
• Answer Serial transfer from register A to register B
G. Kassahun B.
ECENG 3101 Lecture 5
18
5. Registers and Counter
Serial Transfer
• In the parallel mode, information is available from all bits of a
register and all bits can be transferred simultaneously during one
G. Kassahun B.
clock pulse.
• In the serial mode, the registers have a single serial input and a single
19
5. Registers and Counter
Application of Shift Register
Design of Serial Adder
G. Kassahun B.
• Two binary numbers to be added are stored in two shift registers.
• Bits are added one pair at time through full – adder
• One register is used to store the final sum result
G. Kassahun B.
ECENG 3101 Lecture 5
21
5. Registers and Counter
Serial Addition
G. Kassahun B.
ECENG 3101 Lecture 5
22
5. Registers and Counter
Serial Addition with JK flip – flop
G. Kassahun B.
ECENG 3101 Lecture 5
23
5. Registers and Counter
Universal shift register
• A register capable of shifting in one direction only is a unidirectional
G. Kassahun B.
shift register.
24
5. Registers and Counter
Universal shift register
The most general shift register has the following capabilities:
G. Kassahun B.
A clear control to clear the register to 0.
A clock input to synchronize the operation.
A shift-right control and the serial input & output lines associated
G. Kassahun B.
ECENG 3101 Lecture 5
26
5. Registers and Counter
Universal shift register
G. Kassahun B.
ECENG 3101 Lecture 5
27
5. Registers and Counter
Shift Register Counters
G. Kassahun B.
Ring Counter
• A ring counter is a
circular shift register with
G. Kassahun B.
Johnson counter
• Johnson counters are a variation of standard ring counters,
with the inverted output of the last stage feedback to the
29
5. Registers and Counter
Johnson counter
G. Kassahun B.
ECENG 3101 Lecture 5
30
5. Registers and Counter
COUNTERS
• A special type of register that goes through a prescribed sequence
G. Kassahun B.
of states upon the application of the clock pulses.
G. Kassahun B.
or JK), with the output of each flip-flop connected to the C input of
the next higher order flip-flop.
• The flip-flop holding the LSB receives the incoming count pulses.
32
5. Registers and Counter
Binary ripple counter
G. Kassahun B.
ECENG 3101 Lecture 5
33
5. Registers and Counter
Binary ripple counter
G. Kassahun B.
ECENG 3101 Lecture 5
34
5. Registers and Counter
BCD Ripple counter (Decade Counter)
• A decimal counter follows a sequence of 10 states and returns to 0
G. Kassahun B.
after the count of 9.
• The BCD counter is a decade counter, since it counts from 0 to 9.
G. Kassahun B.
ECENG 3101 Lecture 5
36
5. Registers and Counter
BCD Ripple counter (Decade Counter)
G. Kassahun B.
ECENG 3101 Lecture 5
37
5. Registers and Counter
BCD Ripple counter (Decade Counter)
• To count in decimal from 0 to 99, we need a two-decade counter.
G. Kassahun B.
• To count in decimal from 0 to 999, we need a three-decade counter.
G. Kassahun B.
applied to the input of all flip-flops.
• The decision whether a flip-flop is to be complemented is
determined from the values of the data inputs.
39
5. Registers and Counter
Synchronous Binary Counter
• The flip – flop at list significant position is complemented by every
G. Kassahun B.
clock pulse but a flip – flop on other position is complemented if all
flip – flops in lower significant position are set to 1.
• If the enable input is 0,aII J and K inputs are equal to “0” and clock
40
5. Registers and Counter
Synchronous Binary Counter
G. Kassahun B.
ECENG 3101 Lecture 5
41
5. Registers and Counter
Synchronous up – down counter
G. Kassahun B.
• When the up input is 1, the circuit counts up,
G. Kassahun B.
• Counts in a BCD code through 0000 to 1001
• The state table becomes
G. Kassahun B.
• The flip – flops input equations can be simplified by means of
K – maps and unused states from 10 to 15 are taken as don`t
cares. The simplified function becomes
• TQ1 = 1
G. Kassahun B.
• Counters in digital systems require a parallel-load capability
for transferring an initial binary number into the counter prior
to the count operation.
G. Kassahun B.
ECENG 3101 Lecture 5
46
5. Registers and Counter
BCD counter using counter with parallel load
G. Kassahun B.
• In each case a count control is set to 1 to enable the count
through the clock input. Also remember that the load control
inhibits the count and that the clear independent of any
control input.
G. Kassahun B.
• A circuit with n flip –flops has 2n states
• There are occasions when a sequential logic circuit uses less
number this maximum possible number of states.
48
5. Registers and Counter
Counter with unused state
G. Kassahun B.
ECENG 3101 Lecture 5
49