Professional Documents
Culture Documents
GAYATHRI DEVI B
GAYATHRI DEVI B
Department of Electrical & Electronics Engineering
DIGITAL ELECTRONICS
Latches
What is Latch?
❖ Latch is an electronic device, which changes its output
immediately based on the applied input. It is used to store
either 1 or 0 at any specified time.
Types of Latches:
❖ When SET input is low and RESET input is high, then the flip
flop will be in RESET state.
❖ Because the high input of NOR gate with R input drives the
other NOR gate with 0, as its output is 0.
❖ So both the inputs of the NOR gate with S input are 0. This
will cause the output of the flip – flop to settle in RESET
state.
DIGITAL ELECTRONICS
Latches
❖ When SET input is high and RESET input is low, then the flip
flop will be in SET state.
❖ Because the low input of NOR gate with S input drives the
other NOR gate with 1, as its output is 1.
❖ So both the inputs of the NOR gate with R input are 1. This
will cause the output of the flip flop to settle in SET state.
DIGITAL ELECTRONICS
Latches
❖ When both the SET and RESET inputs are high, then the flip
flop will be undefined state.
❖ When SET input is HIGH and RESET input is LOW, then the
flip flop will be in RESET state.
❖ Because the low input of NAND gate with R input drives the
other NAND gate with 1, as its output is 1.
❖ When SET input is LOW and RESET input is HIGH, then the flip
flop will be in SET state.
❖ Because the low input of NAND gate with S input drives the
other NAND gate with 1, as its output is 1.
❖ So both the inputs of the NAND gate with R input are 1. This
will cause the output of the flip – flop to settle in SET state.
DIGITAL ELECTRONICS
Latches
❖ When both the SET and RESET inputs are low, then the flip flop
will be in undefined state.
❖ Because the low inputs of S and R, violates the rule of flip – flop
that the outputs should compliment to each other.
Gayathri Devi B
Department of Electrical & Electronics Engineering
gayathridb@pes.edu
+91 80 6666 3333 Extn 273
DIGITAL ELECTRONICS
GAYATHRI DEVI B
GAYATHRI DEVI B
Department of Electrical & Electronics Engineering
DIGITAL ELECTRONICS
Flip Flops
Classification of Flip-Flops
1.Level Triggered FFs:
Generally, latches belong to this category.
The FF is triggered at levels of the clock pulse(either 1 or 0 level)
2. Edge Triggered FFs:
• The FF changes the state either at the positive/rising edge or at
negative/falling edge of the clock pulse on a control input(CLK)
• If the FF is triggered at rising edge of the CLK, then it’s a
positive edge triggered FF.
• If the FF is triggered at falling edge of the CLK, then it’s a
neegative edge triggered FF.
DIGITAL ELECTRONICS
Flip Flops
❖If the data inputs are transferred to FF outputs only on the
triggering edge of the CLK and is Dependent on CLK , then they
are said to be synchronous inputs.
❖If there are PRESET(PR) and CLEAR(CLR), they affect the state of
the FF and is INDEPENDENT of CLK, then PR and CLR are said to
be asynchronous inputs.
DIGITAL ELECTRONICS
Flip Flops
2. JK Flip-Flop
3. Data/D Flip-Flop
4. Toggle/T Flip-Flop
DIGITAL ELECTRONICS
Flip Flops
1. SR Flip-Flop:
DIGITAL ELECTRONICS
Flip Flops
➢This is because both the output of NAND gate will try to change
the output state depending on the propagation delay and creates
race around problem.
➢The NAND gate which wins the race among the two will retain the
state and other will have complimented state.
DIGITAL ELECTRONICS
Flip Flops
2.JK Flip-Flop:
DIGITAL ELECTRONICS
Flip Flops
3. Data Flip-Flop.
TRUTH TABLE
DIGITAL ELECTRONICS
Flip Flops
TRUTH TABLE
THANK YOU
Gayathri Devi B
Department of Electrical & Electronics Engineering
gayathridb@pes.edu
+91 80 6666 3333 Extn 273
DIGITAL ELECTRONICS
GAYATHRI DEVI B
GAYATHRI DEVI B
Department of Electrical & Electronics Engineering
DIGITAL ELECTRONICS
Characteristic Equations of F/Fs
CLK D Qn Q n+1
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 1
DIGITAL ELECTRONICS
Characteristic Equations of F/Fs
D
The Next State Equation is Q n+1 = D
DIGITAL ELECTRONICS
Characteristic Equations of F/Fs
4. Toggle Flip-Flop Characteristic Equation:
The Next State table is given by;
CLK T Qn Q n+1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 0
DIGITAL ELECTRONICS
Characteristic Equations of F/Fs
Gayathri Devi B
Department of Electrical & Electronics Engineering
gayathridb@pes.edu
+91 80 6666 3333 Extn 273
DIGITAL ELECTRONICS
GAYATHRI DEVI B
GAYATHRI DEVI B
Department of Electrical & Electronics Engineering
DIGITAL ELECTRONICS
Application Tables of F/Fs
X X NO CHANGE
0
0 0 NO CHANGE
1
0 1 0 1 (RESET)
1
1 0 1 0(SET)
1
1 1 FORBIDDEN(INVALID)
1
DIGITAL ELECTRONICS
Application Tables of F/Fs
Q Q+ S R
0 0 0 X
0 1 1 0
1 0 0 1
1 X 0
1
DIGITAL ELECTRONICS
Application Tables of F/Fs
X X NO CHANGE
0
0 0 NO CHANGE
1
0 1 0 1 (RESET)
1
1 0 1 0(SET)
1
1 1 TOGGLING
1
DIGITAL ELECTRONICS
Application Tables of F/Fs
Q Q+ J K
0 0 0 X
0 1 1 X
1 0 X 1
1 X 0
1
DIGITAL ELECTRONICS
Application Tables of F/Fs
0 X NO CHANGE
1 0 0 1
1 1 1 0
DIGITAL ELECTRONICS
Application Tables of F/Fs
Q Q+ D
0 0 0
0 1 1
1 0 0
1 1
1
DIGITAL ELECTRONICS
Application Tables of F/Fs
0 X NO CHANGE
NO CHANGE
1 0
TOGGLING
1 1
DIGITAL ELECTRONICS
Application Tables of F/Fs
Q Q+ T
0 0 0
0 1 1
1 0 1
1 0
1
THANK YOU
Gayathri Devi B
Department of Electrical & Electronics Engineering
gayathridb@pes.edu
+91 80 6666 3333 Extn 273
DIGITAL ELECTRONICS
GAYATHRI DEVI B
GAYATHRI DEVI B
Department of Electrical & Electronics Engineering
DIGITAL ELECTRONICS
SHIFT REGISTERS
❖If multiple F/Fs are connected to store multiple bits of data, then
it’s a register.
❖Shift register store the data and the stored data is moved in /out
of the register using clock pulses.
DIGITAL ELECTRONICS
SHIFT REGISTERS
❖Serial type of shift register is the one where the data is transfer
one bit after the other.
1. SISO :
❖The shift register, which allows serial input (one bit after the
other through a single data line) and produces a serial output is
known as Serial-In Serial-Out shift register. Since there is only one
output, the data leaves the shift register one bit at a time in a
serial pattern, thus the name Serial-In Serial-Out Shift Register.
❖A 4 bit SISO SR is shown here.
DIGITAL ELECTRONICS
SHIFT REGISTERS
❖All these flip-flops are synchronous with each other since the
same clock signal is applied to each flip flop.
DIGITAL ELECTRONICS
SHIFT REGISTERS
2. SIPO
❖The shift register, which allows serial input (one bit after the
other through a single data line) and produces a parallel output
is known as Serial-In Parallel-Out shift register.
❖A 4 bit SIPO SR is shown here.
DIGITAL ELECTRONICS
SHIFT REGISTERS
❖The clear (CLR) signal is connected in addition to the clock
signal to all the 4 flip flops in order to RESET them.
❖The output of the first flip flop is connected to the input of the
next flip flop and so on. All these flip-flops are synchronous
with each other since the same clock signal is applied to each
flip flop.
DIGITAL ELECTRONICS
SHIFT REGISTERS
3. PISO
❖The shift register, which allows parallel input (data is given
separately to each flip flop and in a simultaneous manner) and
produces a serial output is known as Parallel-In Serial-Out shift
register.
❖A 4 bit PISO SR is shown here.
DIGITAL ELECTRONICS- UE19EE203
SHIFT REGISTERS
❖The circuit consists of four D flip-flops which are connected
through external combinational logic.
❖The clock input is directly connected to all the flip flops but the
input data is connected individually to each flip flop through a
multiplexer at the input of every flip flop.
❖The output of the previous flip flop and parallel data input are
connected to the input of the MUX and the output of MUX is
connected to the next flip flop.
❖All these flip-flops are synchronous with each other since the
same clock signal is applied to each flip flop.
DIGITAL ELECTRONICS
SHIFT REGISTERS
4. PIPO
❖The shift register, which allows parallel input (data is given
separately to each flip flop and in a simultaneous manner) and
also produces a parallel output is known as Parallel-In parallel-
Out shift register.
❖A 4 bit PIPO SR is shown here.
DIGITAL ELECTRONICS
SHIFT REGISTERS
❖Data is given as input separately for each flip flop and in the
same way, output also collected individually from each flip flop.
DIGITAL ELECTRONICS
SHIFT REGISTERS
S1 S0 REGISTER OPERATION
0 0 NO CHANGE
0 1 SHIFT RIGHT
1 0 SHIFT LEFT
1 1 PARALLEL LOAD
THANK YOU
Gayathri Devi B
Department of Electrical & Electronics Engineering
gayathridb@pes.edu
+91 80 6666 3333 Extn 273
DIGITAL ELECTRONICS
GAYATHRI DEVI B
GAYATHRI DEVI B
Department of Electrical & Electronics Engineering
DIGITAL ELECTRONICS
COUNTERS-Introduction
Operation: The first flip flop will toggle, and the output of this flip
flop will change from 0 to 1. The output of this flip flop will be taken
by the clock input of the next flip flop. This output will be taken as a
positive edge clock by the second flip flop. This input will not
change the second flip flop's output state because it is the negative
edge triggered flip flop.So, QA = 1 and QB = 0.
DIGITAL ELECTRONICS
RIPPLE COUNTERS
Operation: The first flip flop will toggle again, and the output of
this flip flop will change from 1 to 0.
CLOCK Q3 Q2 Q1 Q0
PULSE
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
10 0 0 0 0
DIGITAL ELECTRONICS- UE19EE203
Ripple Counters
❖The 3-bit ripple counter used in the circuit above has eight
different states, each one of which represents a count value.
❖Similarly, a counter having n flip-flops can have a maximum of 2
to the power n states. The number of states that a counter owns
is known as its mod (modulo) number. Hence a 3-bit counter is a
mod-8 counter.
THANK YOU
Gayathri Devi B
Department of Electrical & Electronics Engineering
gayathridb@pes.edu
+91 80 6666 3333 Extn 273
DIGITAL ELECTRONICS
GAYATHRI DEVI B
GAYATHRI DEVI B
Department of Electrical & Electronics Engineering
DIGITAL ELECTRONICS
Synchronous Binary Counters
❖ The only way we can build such a counter circuit from J-K
flip-flops is to connect all the clock inputs together, so that
each and every flip-flop receives the exact same clock pulse
at the exact same time:
DIGITAL ELECTRONICS
Synchronous Binary Counters
❖ This works because the next bit must change state when the
previous bit changes from high to low – the point at which a
carry must occur to the next bit. Synchronous counters usually
have a carry-out and a carry-in pin for linking counters together
without introducing any propagation delays.
DIGITAL ELECTRONICS
Synchronous Binary Counters
Gayathri Devi B
Department of Electrical & Electronics Engineering
gayathridb@pes.edu
+91 80 6666 3333 Extn 273
DIGITAL ELECTRONICS
GAYATHRI DEVI B
GAYATHRI DEVI B
Department of Electrical & Electronics Engineering
DIGITAL ELECTRONICS
Design of Synchronous Counters
0 0 0 0 0 1
0 0 1 0 1 1
0 1 1 1 0 0
1 0 0 1 0 1
1 0 1 1 1 1
1 1 1 0 0 0
DIGITAL ELECTRONICS
Design of Counters
QT QT+1 T
0 0 0
0 1 1
1 0 1
1 1 0
DIGITAL ELECTRONICS
Design of Counters
T3 T2 T1
0 0 1
0 1 0
1 1 1
0 0 1
0 1 0
1 1 1
DIGITAL ELECTRONICS
Design of Counters
Therefore,T3 = Q2
DIGITAL ELECTRONICS
Design of Counters
T2 = Q1 + Q2
DIGITAL ELECTRONICS
Design of Counters
T1 = Q2’
DIGITAL ELECTRONICS
Design of Counters
Gayathri Devi B
Department of Electrical & Electronics Engineering
gayathridb@pes.edu
+91 80 6666 3333 Extn 273
DIGITAL ELECTRONICS
GAYATHRI DEVI B
GAYATHRI DEVI B
Department of Electrical & Electronics Engineering
DIGITAL ELECTRONICS
Design of Counters
HOME WORK:
Design a counter that counts in the sequence: 101, 100, 011, 010,
001, 000, 101, ... Use clocked D flip-flops. Draw the circuit
diagram. What will happen if your counter starts in an invalid
state?
THANK YOU
Gayathri Devi B
Department of Electrical & Electronics Engineering
gayathridb@pes.edu
+91 80 6666 3333 Extn 273
DIGITAL ELECTRONICS
GAYATHRI DEVI B
GAYATHRI DEVI B
Department of Electrical & Electronics Engineering
DIGITAL ELECTRONICS
Shift Register Based Counters
Ring Counter
❖A ring counter is basically a shift register counter in which the
output of the first flip flop is connected to the next flip flop
and so on and the output of the last flip flop is again fed back
to the input of the first flip flop, thus the name ring counter.
The data pattern within the shift register will circulate as long
as clock pulses are applied.
DIGITAL ELECTRONICS
Shift Register Based Counters
❖The logic circuit given below shows a Ring Counter. The circuit
consists of four D flip-flops which are connected. Since the
circuit consists of four flip flops the data pattern will repeat
after every four clock pulses as shown in the truth table below:
DIGITAL ELECTRONICS
Shift Register Based Counters
Johnson Counter
❖ A Johnson counter is basically a shift register counter in which
the output of the first flip flop is connected to the next flip flop
and so on and the inverted output of the last flip flop is again
fed back to the input of the first flip flop.
Example:
If n=4
4-bit Johnson counter
Initially, suppose all flip-flops are reset.
DIGITAL ELECTRONICS
Shift Register Based Counters
DIGITAL ELECTRONICS
Shift Register Based Counters
where,
CP is clock pulse and
Q1, Q2, Q3, Q4 are the states.
Question: Determine the total number of used and unused
states in 4-bit Johnson counter.
Answer: Total number of used states= 2*n
= 2*4
=8
Total number of unused states= 2n – 2*n
= 24-2*4
=8
DIGITAL ELECTRONICS
Shift Register Based Counters
Gayathri Devi B
Department of Electrical & Electronics Engineering
gayathridb@pes.edu
+91 80 6666 3333 Extn 273
DIGITAL ELECTRONICS
GAYATHRI DEVI B
GAYATHRI DEVI B
Department of Electrical & Electronics Engineering
DIGITAL ELECTRONICS
Conversion of F/Fs
Conversion of JK to T F/F:
Step 1:
Write the function table of T F/F
T Qn Q n+1
0 0 0
1 0 1
0 1 0
0 1 1
DIGITAL ELECTRONICS
Conversion of F/Fs
Step 2:
Write the application table of J K F/F.
Qn Qn+1 J K
0 0 0 X
0 1 1 X
1 0 X 1
1 1 X 0
DIGITAL ELECTRONICS
Conversion of F/Fs
Step 3:
T Qn Qn+1 J K
0 0 0 0 X
1 0 1 1 X
1 1 0 X 1
0 1 1 X 0
DIGITAL ELECTRONICS
Conversion of F/Fs
Step 4:
Write K-Map for determining expression for J, K in terms of T.
T Qn Qn’ Qn
T’ 0 X
T 1 X
J=T
T Qn Qn’ Qn
T’ X 0
T X 1
K=T
DIGITAL ELECTRONICS
Conversion of F/Fs
Step 5:
Write the Implementation diagram.
DIGITAL ELECTRONICS
Conversion of F/Fs
Conversion of JK to D F/F
Step 1:
D Qn Qn+1
0 0 0
0 1 0
1 0 1
1 1 1
DIGITAL ELECTRONICS
Conversion of F/Fs
Step 2:
Qn Qn+1 J Q
0 0 0 X
0 1 1 X
1 0 X 1
1 1 X 0
DIGITAL ELECTRONICS
Conversion of F/Fs
Step 3:
D Qn Qn+1 J K
0 0 0 0 X
1 0 1 1 X
0 1 0 X 1
1 1 1 X 0
DIGITAL ELECTRONICS- UE19EE203
Conversion of F/Fs
Step 4:
DIGITAL ELECTRONICS
Conversion of F/Fs
Step 5:
DIGITAL ELECTRONICS
Conversion of F/Fs
Conversion of JK to SR F/F:
Step 1:
S R Qn Qn+1
0 0 X X
0 1 X 0
1 0 X 1
1 1 -- --
DIGITAL ELECTRONICS
Conversion of F/Fs
Step 2:
Qn Qn+1 J K
0 0 0 X
0 1 1 X
1 0 X 1
1 1 X 0
DIGITAL ELECTRONICS
Conversion of F/Fs
Step 3:
S R Qn Qn+1 J K
0 0 0 0 0 X
0 0 1 1 X 0
0 1 0 0 0 X
0 1 1 0 X 1
1 0 0 1 1 X
1 0 1 1 X 0
1 1 0 FORBIDDEN X X
1 1 1 FORBIDDEN X X
DIGITAL ELECTRONICS
Conversion of F/Fs
Step 4:
DIGITAL ELECTRONICS
Conversion of F/Fs
Step 5:
THANK YOU
Gayathri Devi B
Department of Electrical & Electronics Engineering
gayathridb@pes.edu
+91 80 6666 3333 Extn 273