Module 3
Module 3
T Flip Flop
Clk T J K Q Q^
0 X X X Previous data
1 0 0 0 Previous data
1 1 1 1 Toggle
Clk S R Q Q^
0 X X Previous data Clk D S R Q Q^
1 0 0 Previous data 0 X X X Previous data
1 0 1 0 1 1 0 0 1 0 1
1 1 0 1 0 1 1 1 0 1 0
1 1 1 Invalid
Clk J K Q Q^
Clk T J K Q Q^
0 X X Previous data
0 X X X Previous data
1 0 0 Previous data
1 0 0 0 Previous data
1 0 1 0 1
1 1 1 1 Toggle
1 1 0 1 0
1 1 1 Toggle
Counters
Counter :
Counters are used to count the clock pulses. The clock pulses occur at regular intervals. They are used
to measure the time and frequency. We can also say that counters are sequential circuits which change
their pre-defined states with the help of clock pulses. They are constructed with flip flops and logic
gates.
They are of two types –
1.Asynchronous counter
2.Synchronous counter
Types of clock
Difference between Synchronous and
asynchronous counters
2 bit synchronous up counter (positive edge)
2 bit synchronous up counter (negative edge)
2 bit synchronous down counter (positive
edge)
Clock Q1 Q0
Initially 0 0
1 1 1
2 1 0
3 0 1
4 0 0
2 bit synchronous down counter (negative
edge)
Clock Q1 Q0
Initially 0 0
1 1 1
2 1 0
3 0 1
4 0 0
Design of 3 bit synchronous up counter using state diagram and
excitation table
Asynchronous (ripple) UP counter
Asynchronous (ripple) up counter negative edge)
Asynchronous (ripple) down counter
Clock Q1 Q0
Initially 0 0
1 1 1
2 1 0
3 0 1
4 0 0
3 bit asynchronous up counter (-ve edge
triggered)
Shift Registers
• A register is a device used to store Information.
• Flip Flops are often used to make Registers.
• Each Flip flop can store 1-bit information and for storing n-bit word n flip flops will
be required.
• A shift register is a type of digital circuit using a cascade of flip-flops where the
output of one flip-flop is connected to the input of the next.
• They share a single clock signal, which causes the data stored in the system to
shift from one location to the next.
Types of Shift register based on directions
Sometimes it is necessary to shift the least significant digit first ,as when addition is be carried out
serially
Shift Right Register
Types of Shift Register based on inputs and
outputs
• Following are the four types of shift registers based on applying
inputs and accessing of outputs.
• Serial In − Serial Out shift register.
• Serial In − Parallel Out shift register.
• Parallel In − Serial Out shift register.
• Parallel In − Parallel Out shift register.
Serial IN Serial OUT
• In "Serial Input Serial Output", the data is shifted "IN" or "OUT" serially. In
SISO, a single bit is shifted at a time in either right or left direction under
clock control.
• The SISO shift register is mainly used to generate time delays in
digital logic circuits.
Serial-in to Parallel-out (SIPO)
The register is loaded with serial data, one bit at a time, with the stored
data being available at the output in parallel form.
Parallel-in to Serial-out (PISO)
• When Shift/load =1
Gates G1, G3, and G5 are enabled, allowing the data bits to shift right
from one stage to the next.
• When Shift/load =0
• Gates G2, G4 and G6 are enabled, allowing the data to be loaded in
the shift register.
As this type of shift register converts parallel data, such as an 8-bit data word into serial format, it
can be used to multiplex many different input lines into a single serial DATA stream which can be
sent directly to a computer or transmitted over a communications line.
Commonly available IC’s include the 74HC166 8-bit Parallel-in/Serial-out Shift Registers.
4-bit Parallel-in to Parallel-out
The PIPO shift register is the simplest of the four configurations as
it has only three connections, the parallel input (PI) which
determines what enters the flip-flop, the parallel output (PO) and
the sequencing clock signal (Clk).