SlideShare a Scribd company logo
1 of 44
Unit -5
Flip -Flops
2
Sequential Circuits
A sequential circuit is a circuit where the output depends
upon not only the present state of the inputs but also past
state of the inputs.
Each of the input and output can have either of the two
states :
– Logic 0 (low)
– Logic 1 (high)
– Examples : Flip-Flop, counter, timer, RAM, Latches.
3
Flip-Flops
A flip-flop is a bi-stable circuit, which has two stable states
either high or low.
It can store the bit 0 or 1 and is used for storing values till
required.
The flip-flop has the property to remain in one stable state
until it is directed by an input signal/pulse to switch over to
the other state.
This input signal/pulse is known as a trigger.
4
Flip-Flops
When a trigger is received, the flip-flop outputs change their
states according some pre-defined rules, and they will
remain in that state until another trigger is received.
Types of flip – flops :
• R-S Flip – Flop
• J-K Flip - Flop
• Master – Slave Flip - Flop
• Toggle Flip - Flop
• D Flip - Flop
5
A basic FF symbol/logic circuit
6
R-S/S-R Flip-Flops
An RS flip-flop is a simple building block of a FF. It has two input states
SET and RESET. It is also known as R-S Latch.
It can be constructed by two NANDs or two NOR gates.
When R-S FF is set, the output Q goes to the state ‘1’ and when it is
reset, the output Q goes to a ‘0’ state.
SET- RESET (R-S/ S-R Flip Flop)
S
R
Q
Q
FIG : NAND GATE – S/R FF
with two inputs
7
Operation of R-S/S-R Flip-Flops
1. SET = RESET = 1 is the normal resting condition of the ff.
It has no effect on the output state of the flip –flop.
Both Q and Q’ outputs remain in the same logic state in which
they were prior to this input condition.
2. SET = 1 and RESET = 0 sets the ff. Q will become 1 and Q’ will
become 0.
3. SET = 0 and RESET = 1 resets or clears the ff. Q becomes 0 and Q’
becomes 1.
4. SET=RESET=0 is a forbidden condition of a ff. Such a condition tries
to set and reset the ff at the same time i.e. tries to set Q=Q’=1.
SET- RESET (R-S/ S-R Flip Flop)
8
Truth Table - R-S/S-R Flip-Flops
SET- RESET (R-S/ S-R Flip Flop)
9
R-S/S-R Flip-Flops
SET- RESET (R-S/ S-R Flip Flop)
FIG : NOT/OR GATE – S/R FF
NOTE : THIS R-S FF IS ALSO KNOWN AS R-S FF WITH ACTIVE – HIGH STATE
(I.E. A FF WHERE SET =1 SETS THE FF, SET =0 RESETS THE FF)
10
R-S/S-R Flip-Flops
R-S/ S-R Flip Flop – ACTIVE LOW STATE
An R-S FF is a ‘LOW STATE’ FF when, SET =0 sets the FF and SET =1 resets the FF.
In an ACTIVE –LOW RS FF, if SET=RESET=1, the FF values will remain unchanged,
If SET=RESET=0, the FF values will be forbidden.
R
S
Q
Q
S R Q Q’ STATE
0 0 x X Forbidden/ Invalid
0 1 1 0 SET
1 0 0 1 RESET
1 1 NC NC NO CHANGE
11
Clocked R-S FF- HIGH ACTIVE STATE
A clocked FF is a FF, in which the operations of the flip flop are carried out
based on the value of the clock i.e. the FF will change its state only when the
CLOCK has a specific input value.
For A HIGH active state Clocked RS FF, the input values and output values will
change only when the input value of the clock will be 1.
The state of the FF will change based on the values of R,S only when Clock = 1.
12
Clocked R-S FF- HIGH ACTIVE STATE
S R Q Q’ CLK STATE
0 0 - - 0 NO CHANGE
0 0 NC NC 1 NO CHANGE
0 1 0 1 0 NO CHANGE
0 1 0 1 1 RESET
1 0 1 0 0 NO CHANGE
1 0 1 0 1 SET
1 1 X X 0 NO CHANGE
1 1 X X 1 FORBIDDEN /
INVALID
13
Clocked R-S FF- HIGH ACTIVE STATE
Working of clocked RS HIGH ACTIVE STATE FF
• When the clock signal is high (clk=1), the two NAND gates are enabled and
the S and R inputs are passed in the FF, with their states in complement
form (see figure).
• The output can change the states as per values of R and S.When S=1 and
R=0, the FF will be set if the CLOCK is high, i.e. clk =1.
• When S=0 and R=1, the FF will be reset if clk =1.
• When S=R=1 the FF will be in a forbidden state and when S=R=0 the state of
the FF will remain unchanged.
• IF CLK=0, the inputs R,S will be disabled and hence there would be no
change in the state of the FF.
14
Clocked R-S FF- LOW ACTIVE STATE
For A LOW active state Clocked RS FF, the input values and output values will
change only when the input value of the clock will be 1.
The state of the FF will change based on the values of R,S only when Clock = 1.
15
Clocked R-S FF- LOW ACTIVE STATE
S R Q Q’ CLK STATE
0 0 - - 0 NO CHANGE
0 0 X X 1 FORBIDDEN/INVAL
ID
0 1 0 1 0 NO CHANGE
0 1 0 1 1 SET
1 0 1 0 0 NO CHANGE
1 0 1 0 1 RESET
1 1 - - 0 NO CHANGE
1 1 NC NC 1 NO CHANGE
16
Clocked R-S FF- LOW ACTIVE STATE
Working of clocked RS HIGH ACTIVE STATE FF
• When the clock signal is high (clk=1), the two NAND gates are enabled and
the S and R inputs are passed in the FF, with their states in complement
form (see figure).
• The output can change the states as per values of R and S. When S=0 and
R=1, the FF will be set if the CLOCK is high, i.e. clk =1.
• When S=1 and R=0, the FF will be reset if clk =1.
• When S=R=1 the FF will be remain unchanged and when S=R=0 the state of
the FF will be forbidden of invalid.
• IF CLK=0, the inputs R,S will be disabled and hence there would be no
change in the state of the FF.
17
J-K FLIP FLOP
• A JK FF is a modified version of RS/SR FF with no invalid or forbidden state.
• Note: Edge/Level triggered FF diagram page - 291
18
Master- Slave FLIP FLOP
• In JK FF, when J=K=1 and CLK =1, their might be a situation when the clock
pulse takes longer then the inputs or the inputs take longer to come then
the clk pulse.
• This is because each of the inputs come by different channels and so there
are chances of delay.
• If the delay occurs in either of the three inputs then the input which has
already come will toggle constantly and it will not be possible to determine
the output value. This situation is called the RACE CONDITION.
• M-S FF is used to avoid race condition.
19
Master- Slave FLIP FLOP
• A MS FF is a cascade of two JK FFs. The outputs from Q and Q’ from the
“Slave” flip-flop are fed back to the inputs of the “Master” with the outputs
of the “Master” flip flop being connected to the two inputs of the “Slave”
flip flop.
• The clocks of both the FF are connected by a inverter which controls the
clock pulse of both the FFs.
• Due to the inverter, when clock of the master FF is high, the clock of the
slave FF will be low or 0 i.e. disabled.When clock of the slave FF is high, the
clock of the master will be low or 0 i.e. disabled.
20
Master- Slave FLIP FLOP
J K Q Q’ CLK STATE
0 0 NC NC 1 NO CHANGE
1 0 1 0 1 SET
0 1 0 1 1 RESET
1 1 Q’ Q 1 TOGGLE
21
T-FLIP FLOP
A T FF or a Toggle FF is a modified JK FF in which J and K input are connected permanently together. It is
also called as single input JK FF.
The T flip flop has only two states hold and toggle and it has only two possible values.
When T =0 , the FF will be in a hold state and there will be no change in the outputs.
When T=1, the FF will be in a toggle state and the outputs will toggle their values.
T Q Q’ STATE
0 NC NC NO CHANGE
1 Q’ Q TOGGLE
22
D-FLIP FLOP
A D FF also called a delay FF, is a modified version of the S-R FF.
It is used to provide temporary storage of one bit of data. Also, D FF is one of the most important clocked FF, as it
ensures that S and R will be never equal to 1 at the same time.
The D-type flip flop is constructed from a gated SR flip-flop with an inverter added between the S and the R inputs
to allow for a single D(data) input.The input D is used to set the FF and the inverter is used to reset the FF.
When D=0, the FF will be reset , and when D=1 the FF will be set.
D Q Q’ STATE
0 0 1 RESET
1 1 0 SET
23
FLIP FLOP Applications
Flip-flops are used in a variety of application circuits such as : -
1. Frequency Division and Counting Circuits. (Using Counters)
2. Data Storage and Transfer Circuits. (Using Registers)
Both these applications use a cascaded arrangement of flip-flops with or without some additional combinational
logic to perform the desired function.
Other applications of flip-flops are:
1. Switch debouncing
2. Flip-Flop synchronization
3. Detecting Edge sequence
24
Unit -6
Counters & Registers
25
Introduction
Counters and registers are Medium Scale Integration type of sequential logic circuits.
Both of them are made by cascaded arrangement of more than one flip flops with or without combinational
circuits.
Counters are mainly used to measure time interval or to measure frequency of a given signal. Registers are used
to store data temporarily until they are given to a digital circuit.
Counters:
There are two main types of counters :
1. Asynchronous Counters
2. Synchronous Counters
26
Counters
There are two main types of counters :
1. Asynchronous Counters
In these types of counters, the clock input is given only to the first flip flop, the remaining clocks get the
input as an output of the previous flip flop and thus there is a delay of getting inputs in all the clocks.
2. Synchronous Counters
In these types of counters, the clock input is given simultaneously to all the flip-flops at once.
27
Counters : Ripple Counter
A ripple counter is a cascaded arrangement of flip-flops where the output of one flip-flop drives the clock input of
the following flip-flop.
In a ripple counter, the clock input is applied only to the first flip-flop, also called the input flip-flop, in the
cascaded arrangement. The output of the first flip-flop acts as the clock input to the second flip-flop, the output of
the second flip-flop is the clock input of the third flip-flop and so on.
In general, in an arrangement of n flip-flops, the clock input to the nth flip-flop comes from the output of the
(n − 1) th flip-flop for n > 1.
Delay in the clock input can be counted by : n x propagation delay of one flip flop.
Limitation : All FFs cannot change their state at the same time as the clock signal is not available to all the FFs at
the same time.
28
Counters : Ripple Counter
29
Counters : Synchronous Counters
Also known as parallel counters.
all the flip-flops in the counter change state at the same time in synchronism with the input clock signal.
The clock signal is simultaneously applied to the clock inputs of all the flip-flops. The delay involved in this
case is equal to the propagation delay of one flip-flop only, irrespective of the number of flip-flops used to
construct the counter.
30
Counters : Binary Ripple Counter
A binary ripple counter consists of a series connection of complementing flip-flops in which the output of
each flip-flop is connected to the C input of the next higher-order flip-flop.
The output of the first flip-flop feeds the clock input of the second, and the output of the second flip-flop
feeds the clock input of the third and so on.
The flip flop here is made by using negative edge triggerreing flip flops.
31
Counters : Binary Ripple Counter
The flip flop holding the LSB receives the input.
For an incremental counter, the count starts with binary 0 and increments by one with receiving each
clock input. After count 15, the counter goes back to 0 and begins the counter again.
For an decremental counter, the count starts with binary 15 and decrements by one with receiving each
clock input. After count 0, the counter goes back to 15 and begins the counter again.
32
Counters : Binary Ripple Counter
.
33
Registers
.
Types of registers:
• Shift registers such as
▪ Serial ln Serial Out
▪ Serial In Parallel Out
▪ Parallel In Serial Out
▪ Parallel In Parallel Out
Register:
− A set of n flip-flops
− Each flip-flop stores one bit
− Two basic functions: data storage and data
34
Registers- Shift Registers
A shift register is a digital device used for storage and transfer of data.
The shift register forms an important link between the main digital system and the
input/output channels.
The task of the shift register is
- allow each of the flip flop to pass stored data to its adjacent register.
- design counters for arithmetic operations
The basic building block of a shift register is the D- Flip Flop.
The storage capacity of a shift register depends on the number of flip flops used to design the
shift register.
Shift registers are classified based on the method of load data and read data from shift
registers.
35
Shift Registers – Serial In Serial Out
The SISO register accepts the data serially, i.e. one bit at a time on a single line. The output is
also produced serially, one bit at a time.
Circuit/ Symbol Representation
36
Shift Registers – Serial In Serial Out
The SISO register accepts the data serially, i.e. one bit at a time on a single line. The output is
also produced serially, one bit at a time.
The operation of the shift register is as follows:
1. The register is first cleared, forcing all four outputs to zero.
2. The input data is then applied sequentially to the D input of the first flip-flop
on the left (QA).
3. During each clock pulse, one bit is transmitted from left to right.
4. Assume a data word to be 1001.
5. The least significant bit of the data has to be shifted through the register from QA to QD.
In order to get the data out of the register, they must be shifted out serially.
Circuit/ Symbol Representation
37
Shift Registers – Serial In Serial Out
The clock corresponds to the rising edge of the serial input.
If the serial input goes from 0 to 1 just before CK pulse 1, the Q output of flip-flop QA will go high at the rising
edge of CK pulse 1. At the next clock pulse rising edge, the logic 1 will be transferred to QB and so on until it
reaches QD, and the serial output.
Circuit/ Symbol Representation
38
Shift Registers – Serial In Serial Out
39
Shift Registers – Serial In Parallel Out
In a SIPO, the register is loaded with serial data, one bit at a time, with the stored data being available at the
output in a parallel form.
An 8-bit SIPO Register
40
Shift Registers – Serial In Parallel Out
The gated serial inputs A and B control the incoming serial data and to enable the shift register.
Once the data are stored, each bit appears on its respective shift register output line, and all bits are
available simultaneously.
41
Shift Registers – Parallel In Serial Out
In PISO register, he parallel data is loaded into the register simultaneously and is shifted out of the
register serially one bit at a time under clock control.
D0, D1, D2 and D3 are the parallel inputs, where D0 is the most significant bit and D3 is the least
significant bit. To write data in, the mode control line is taken to LOW and the data is clocked in. The
data can be shifted when the mode control line is HIGH as SHIFT is active high
42
Shift Registers – Parallel In Serial Out
43
Shift Registers – Parallel In Parallel Out
In PIPO register, the parallel data is loaded simultaneously into the register, and transferred together to
their respective outputs by the same clock pulse.
Here, D’s are the parallel inputs and Q’s are the parallel outputs. There is no interconnection between the
individual flip-flops as no serial shifting of data is required.
44
Shift Registers – Parallel In Parallel Out

More Related Content

What's hot

Latches and flip flop
Latches and flip flopLatches and flip flop
Latches and flip flopShuaib Hotak
 
Sequential circuits in Digital Electronics
Sequential circuits in Digital ElectronicsSequential circuits in Digital Electronics
Sequential circuits in Digital ElectronicsVinoth Loganathan
 
Race around and master slave flip flop
Race around and master slave flip flopRace around and master slave flip flop
Race around and master slave flip flopShubham Singh
 
2.3 sequantial logic circuit
2.3 sequantial logic circuit2.3 sequantial logic circuit
2.3 sequantial logic circuitWan Afirah
 
flip flop circuits and its applications
flip flop circuits and its applicationsflip flop circuits and its applications
flip flop circuits and its applicationsGaditek
 
Flip-Flop || Digital Electronics
Flip-Flop || Digital ElectronicsFlip-Flop || Digital Electronics
Flip-Flop || Digital ElectronicsMd Sadequl Islam
 
Registers and counters
Registers and counters Registers and counters
Registers and counters Deepak John
 
Sequential circuit
Sequential circuitSequential circuit
Sequential circuitBrenda Debra
 
Understanding Flip Flops
Understanding Flip FlopsUnderstanding Flip Flops
Understanding Flip Flopsgavhays
 
flip flop Presentation
flip flop  Presentationflip flop  Presentation
flip flop Presentationmaalik123
 
8.flip flops and registers
8.flip flops and registers8.flip flops and registers
8.flip flops and registersDeepak Sharma
 
Computer Oragnization Flipflops
Computer Oragnization FlipflopsComputer Oragnization Flipflops
Computer Oragnization FlipflopsVanitha Chandru
 
Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Mukesh Chinta
 

What's hot (20)

Latches and flip flop
Latches and flip flopLatches and flip flop
Latches and flip flop
 
Sequential circuits in Digital Electronics
Sequential circuits in Digital ElectronicsSequential circuits in Digital Electronics
Sequential circuits in Digital Electronics
 
Counters
CountersCounters
Counters
 
Race around and master slave flip flop
Race around and master slave flip flopRace around and master slave flip flop
Race around and master slave flip flop
 
2.3 sequantial logic circuit
2.3 sequantial logic circuit2.3 sequantial logic circuit
2.3 sequantial logic circuit
 
Jk flip flop
Jk flip flopJk flip flop
Jk flip flop
 
Counter
CounterCounter
Counter
 
flip flop circuits and its applications
flip flop circuits and its applicationsflip flop circuits and its applications
flip flop circuits and its applications
 
JK flip flops
JK flip flopsJK flip flops
JK flip flops
 
D Flip Flop
D Flip Flop D Flip Flop
D Flip Flop
 
Flip-Flop || Digital Electronics
Flip-Flop || Digital ElectronicsFlip-Flop || Digital Electronics
Flip-Flop || Digital Electronics
 
Registers and counters
Registers and counters Registers and counters
Registers and counters
 
BE PPT (FLIP FLOPS)
BE PPT (FLIP FLOPS)BE PPT (FLIP FLOPS)
BE PPT (FLIP FLOPS)
 
Sequential circuit
Sequential circuitSequential circuit
Sequential circuit
 
Understanding Flip Flops
Understanding Flip FlopsUnderstanding Flip Flops
Understanding Flip Flops
 
Chapter 6: Sequential Logic
Chapter 6: Sequential LogicChapter 6: Sequential Logic
Chapter 6: Sequential Logic
 
flip flop Presentation
flip flop  Presentationflip flop  Presentation
flip flop Presentation
 
8.flip flops and registers
8.flip flops and registers8.flip flops and registers
8.flip flops and registers
 
Computer Oragnization Flipflops
Computer Oragnization FlipflopsComputer Oragnization Flipflops
Computer Oragnization Flipflops
 
Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)
 

Similar to Flip Flops & Counters: An Introduction

FYBSC IT Digital Electronics Unit IV Chapter II Sequential Circuits- Flip-Flops
FYBSC IT Digital Electronics Unit IV Chapter II Sequential Circuits- Flip-FlopsFYBSC IT Digital Electronics Unit IV Chapter II Sequential Circuits- Flip-Flops
FYBSC IT Digital Electronics Unit IV Chapter II Sequential Circuits- Flip-FlopsArti Parab Academics
 
Flipflops and Excitation tables of flipflops
Flipflops and Excitation tables of flipflopsFlipflops and Excitation tables of flipflops
Flipflops and Excitation tables of flipflopsstudent
 
Sequentialcircuits
SequentialcircuitsSequentialcircuits
SequentialcircuitsRaghu Vamsi
 
Bistable multivibators (flip flops)
Bistable multivibators (flip flops)Bistable multivibators (flip flops)
Bistable multivibators (flip flops)Karrar Abd Alhadi
 
Digital Electronics Unit_3.pptx
Digital Electronics Unit_3.pptxDigital Electronics Unit_3.pptx
Digital Electronics Unit_3.pptxThapar Institute
 
SEQUENTIAL LOGIC CIRCUITS (FLIP FLOPS AND LATCHES)
SEQUENTIAL LOGIC CIRCUITS (FLIP FLOPS AND LATCHES)SEQUENTIAL LOGIC CIRCUITS (FLIP FLOPS AND LATCHES)
SEQUENTIAL LOGIC CIRCUITS (FLIP FLOPS AND LATCHES)Sairam Adithya
 
Sequential logic circuits flip-flop pt 1
Sequential logic circuits   flip-flop pt 1Sequential logic circuits   flip-flop pt 1
Sequential logic circuits flip-flop pt 1Sarah Sue Calbio
 
UNIT - III.pptx
UNIT - III.pptxUNIT - III.pptx
UNIT - III.pptxamudhak10
 
Digital electronics Flip Flop
Digital electronics Flip FlopDigital electronics Flip Flop
Digital electronics Flip FlopMuhammadAnus6
 
Flip flop slide
Flip flop slideFlip flop slide
Flip flop slidejyothir19
 
Digital Fundamental Material for the student
Digital Fundamental Material for the studentDigital Fundamental Material for the student
Digital Fundamental Material for the studentjainyshah20
 

Similar to Flip Flops & Counters: An Introduction (20)

Sequential circuits
Sequential circuitsSequential circuits
Sequential circuits
 
FYBSC IT Digital Electronics Unit IV Chapter II Sequential Circuits- Flip-Flops
FYBSC IT Digital Electronics Unit IV Chapter II Sequential Circuits- Flip-FlopsFYBSC IT Digital Electronics Unit IV Chapter II Sequential Circuits- Flip-Flops
FYBSC IT Digital Electronics Unit IV Chapter II Sequential Circuits- Flip-Flops
 
Flipflop
FlipflopFlipflop
Flipflop
 
flip flops
flip flops flip flops
flip flops
 
Flipflops and Excitation tables of flipflops
Flipflops and Excitation tables of flipflopsFlipflops and Excitation tables of flipflops
Flipflops and Excitation tables of flipflops
 
Sequentialcircuits
SequentialcircuitsSequentialcircuits
Sequentialcircuits
 
DPCO UNIT 2.pptx
DPCO UNIT 2.pptxDPCO UNIT 2.pptx
DPCO UNIT 2.pptx
 
DPCO UNIT 2.pdf
DPCO UNIT 2.pdfDPCO UNIT 2.pdf
DPCO UNIT 2.pdf
 
Bistable multivibators (flip flops)
Bistable multivibators (flip flops)Bistable multivibators (flip flops)
Bistable multivibators (flip flops)
 
Digital Electronics Unit_3.pptx
Digital Electronics Unit_3.pptxDigital Electronics Unit_3.pptx
Digital Electronics Unit_3.pptx
 
SEQUENTIAL CIRCUITS [Flip-flops and Latches]
SEQUENTIAL CIRCUITS [Flip-flops and Latches]SEQUENTIAL CIRCUITS [Flip-flops and Latches]
SEQUENTIAL CIRCUITS [Flip-flops and Latches]
 
Lecture 1 6844
Lecture 1 6844Lecture 1 6844
Lecture 1 6844
 
SEQUENTIAL LOGIC CIRCUITS (FLIP FLOPS AND LATCHES)
SEQUENTIAL LOGIC CIRCUITS (FLIP FLOPS AND LATCHES)SEQUENTIAL LOGIC CIRCUITS (FLIP FLOPS AND LATCHES)
SEQUENTIAL LOGIC CIRCUITS (FLIP FLOPS AND LATCHES)
 
Sequential logic circuits flip-flop pt 1
Sequential logic circuits   flip-flop pt 1Sequential logic circuits   flip-flop pt 1
Sequential logic circuits flip-flop pt 1
 
UNIT - III.pptx
UNIT - III.pptxUNIT - III.pptx
UNIT - III.pptx
 
Ds flip flop
Ds flip flopDs flip flop
Ds flip flop
 
Digital electronics Flip Flop
Digital electronics Flip FlopDigital electronics Flip Flop
Digital electronics Flip Flop
 
Flip flop slide
Flip flop slideFlip flop slide
Flip flop slide
 
Digital Fundamental Material for the student
Digital Fundamental Material for the studentDigital Fundamental Material for the student
Digital Fundamental Material for the student
 
Flip flops
Flip flopsFlip flops
Flip flops
 

Recently uploaded

How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationAadityaSharma884161
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxsqpmdrvczh
 

Recently uploaded (20)

How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint Presentation
 
Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptx
 

Flip Flops & Counters: An Introduction

  • 2. 2 Sequential Circuits A sequential circuit is a circuit where the output depends upon not only the present state of the inputs but also past state of the inputs. Each of the input and output can have either of the two states : – Logic 0 (low) – Logic 1 (high) – Examples : Flip-Flop, counter, timer, RAM, Latches.
  • 3. 3 Flip-Flops A flip-flop is a bi-stable circuit, which has two stable states either high or low. It can store the bit 0 or 1 and is used for storing values till required. The flip-flop has the property to remain in one stable state until it is directed by an input signal/pulse to switch over to the other state. This input signal/pulse is known as a trigger.
  • 4. 4 Flip-Flops When a trigger is received, the flip-flop outputs change their states according some pre-defined rules, and they will remain in that state until another trigger is received. Types of flip – flops : • R-S Flip – Flop • J-K Flip - Flop • Master – Slave Flip - Flop • Toggle Flip - Flop • D Flip - Flop
  • 5. 5 A basic FF symbol/logic circuit
  • 6. 6 R-S/S-R Flip-Flops An RS flip-flop is a simple building block of a FF. It has two input states SET and RESET. It is also known as R-S Latch. It can be constructed by two NANDs or two NOR gates. When R-S FF is set, the output Q goes to the state ‘1’ and when it is reset, the output Q goes to a ‘0’ state. SET- RESET (R-S/ S-R Flip Flop) S R Q Q FIG : NAND GATE – S/R FF with two inputs
  • 7. 7 Operation of R-S/S-R Flip-Flops 1. SET = RESET = 1 is the normal resting condition of the ff. It has no effect on the output state of the flip –flop. Both Q and Q’ outputs remain in the same logic state in which they were prior to this input condition. 2. SET = 1 and RESET = 0 sets the ff. Q will become 1 and Q’ will become 0. 3. SET = 0 and RESET = 1 resets or clears the ff. Q becomes 0 and Q’ becomes 1. 4. SET=RESET=0 is a forbidden condition of a ff. Such a condition tries to set and reset the ff at the same time i.e. tries to set Q=Q’=1. SET- RESET (R-S/ S-R Flip Flop)
  • 8. 8 Truth Table - R-S/S-R Flip-Flops SET- RESET (R-S/ S-R Flip Flop)
  • 9. 9 R-S/S-R Flip-Flops SET- RESET (R-S/ S-R Flip Flop) FIG : NOT/OR GATE – S/R FF NOTE : THIS R-S FF IS ALSO KNOWN AS R-S FF WITH ACTIVE – HIGH STATE (I.E. A FF WHERE SET =1 SETS THE FF, SET =0 RESETS THE FF)
  • 10. 10 R-S/S-R Flip-Flops R-S/ S-R Flip Flop – ACTIVE LOW STATE An R-S FF is a ‘LOW STATE’ FF when, SET =0 sets the FF and SET =1 resets the FF. In an ACTIVE –LOW RS FF, if SET=RESET=1, the FF values will remain unchanged, If SET=RESET=0, the FF values will be forbidden. R S Q Q S R Q Q’ STATE 0 0 x X Forbidden/ Invalid 0 1 1 0 SET 1 0 0 1 RESET 1 1 NC NC NO CHANGE
  • 11. 11 Clocked R-S FF- HIGH ACTIVE STATE A clocked FF is a FF, in which the operations of the flip flop are carried out based on the value of the clock i.e. the FF will change its state only when the CLOCK has a specific input value. For A HIGH active state Clocked RS FF, the input values and output values will change only when the input value of the clock will be 1. The state of the FF will change based on the values of R,S only when Clock = 1.
  • 12. 12 Clocked R-S FF- HIGH ACTIVE STATE S R Q Q’ CLK STATE 0 0 - - 0 NO CHANGE 0 0 NC NC 1 NO CHANGE 0 1 0 1 0 NO CHANGE 0 1 0 1 1 RESET 1 0 1 0 0 NO CHANGE 1 0 1 0 1 SET 1 1 X X 0 NO CHANGE 1 1 X X 1 FORBIDDEN / INVALID
  • 13. 13 Clocked R-S FF- HIGH ACTIVE STATE Working of clocked RS HIGH ACTIVE STATE FF • When the clock signal is high (clk=1), the two NAND gates are enabled and the S and R inputs are passed in the FF, with their states in complement form (see figure). • The output can change the states as per values of R and S.When S=1 and R=0, the FF will be set if the CLOCK is high, i.e. clk =1. • When S=0 and R=1, the FF will be reset if clk =1. • When S=R=1 the FF will be in a forbidden state and when S=R=0 the state of the FF will remain unchanged. • IF CLK=0, the inputs R,S will be disabled and hence there would be no change in the state of the FF.
  • 14. 14 Clocked R-S FF- LOW ACTIVE STATE For A LOW active state Clocked RS FF, the input values and output values will change only when the input value of the clock will be 1. The state of the FF will change based on the values of R,S only when Clock = 1.
  • 15. 15 Clocked R-S FF- LOW ACTIVE STATE S R Q Q’ CLK STATE 0 0 - - 0 NO CHANGE 0 0 X X 1 FORBIDDEN/INVAL ID 0 1 0 1 0 NO CHANGE 0 1 0 1 1 SET 1 0 1 0 0 NO CHANGE 1 0 1 0 1 RESET 1 1 - - 0 NO CHANGE 1 1 NC NC 1 NO CHANGE
  • 16. 16 Clocked R-S FF- LOW ACTIVE STATE Working of clocked RS HIGH ACTIVE STATE FF • When the clock signal is high (clk=1), the two NAND gates are enabled and the S and R inputs are passed in the FF, with their states in complement form (see figure). • The output can change the states as per values of R and S. When S=0 and R=1, the FF will be set if the CLOCK is high, i.e. clk =1. • When S=1 and R=0, the FF will be reset if clk =1. • When S=R=1 the FF will be remain unchanged and when S=R=0 the state of the FF will be forbidden of invalid. • IF CLK=0, the inputs R,S will be disabled and hence there would be no change in the state of the FF.
  • 17. 17 J-K FLIP FLOP • A JK FF is a modified version of RS/SR FF with no invalid or forbidden state. • Note: Edge/Level triggered FF diagram page - 291
  • 18. 18 Master- Slave FLIP FLOP • In JK FF, when J=K=1 and CLK =1, their might be a situation when the clock pulse takes longer then the inputs or the inputs take longer to come then the clk pulse. • This is because each of the inputs come by different channels and so there are chances of delay. • If the delay occurs in either of the three inputs then the input which has already come will toggle constantly and it will not be possible to determine the output value. This situation is called the RACE CONDITION. • M-S FF is used to avoid race condition.
  • 19. 19 Master- Slave FLIP FLOP • A MS FF is a cascade of two JK FFs. The outputs from Q and Q’ from the “Slave” flip-flop are fed back to the inputs of the “Master” with the outputs of the “Master” flip flop being connected to the two inputs of the “Slave” flip flop. • The clocks of both the FF are connected by a inverter which controls the clock pulse of both the FFs. • Due to the inverter, when clock of the master FF is high, the clock of the slave FF will be low or 0 i.e. disabled.When clock of the slave FF is high, the clock of the master will be low or 0 i.e. disabled.
  • 20. 20 Master- Slave FLIP FLOP J K Q Q’ CLK STATE 0 0 NC NC 1 NO CHANGE 1 0 1 0 1 SET 0 1 0 1 1 RESET 1 1 Q’ Q 1 TOGGLE
  • 21. 21 T-FLIP FLOP A T FF or a Toggle FF is a modified JK FF in which J and K input are connected permanently together. It is also called as single input JK FF. The T flip flop has only two states hold and toggle and it has only two possible values. When T =0 , the FF will be in a hold state and there will be no change in the outputs. When T=1, the FF will be in a toggle state and the outputs will toggle their values. T Q Q’ STATE 0 NC NC NO CHANGE 1 Q’ Q TOGGLE
  • 22. 22 D-FLIP FLOP A D FF also called a delay FF, is a modified version of the S-R FF. It is used to provide temporary storage of one bit of data. Also, D FF is one of the most important clocked FF, as it ensures that S and R will be never equal to 1 at the same time. The D-type flip flop is constructed from a gated SR flip-flop with an inverter added between the S and the R inputs to allow for a single D(data) input.The input D is used to set the FF and the inverter is used to reset the FF. When D=0, the FF will be reset , and when D=1 the FF will be set. D Q Q’ STATE 0 0 1 RESET 1 1 0 SET
  • 23. 23 FLIP FLOP Applications Flip-flops are used in a variety of application circuits such as : - 1. Frequency Division and Counting Circuits. (Using Counters) 2. Data Storage and Transfer Circuits. (Using Registers) Both these applications use a cascaded arrangement of flip-flops with or without some additional combinational logic to perform the desired function. Other applications of flip-flops are: 1. Switch debouncing 2. Flip-Flop synchronization 3. Detecting Edge sequence
  • 25. 25 Introduction Counters and registers are Medium Scale Integration type of sequential logic circuits. Both of them are made by cascaded arrangement of more than one flip flops with or without combinational circuits. Counters are mainly used to measure time interval or to measure frequency of a given signal. Registers are used to store data temporarily until they are given to a digital circuit. Counters: There are two main types of counters : 1. Asynchronous Counters 2. Synchronous Counters
  • 26. 26 Counters There are two main types of counters : 1. Asynchronous Counters In these types of counters, the clock input is given only to the first flip flop, the remaining clocks get the input as an output of the previous flip flop and thus there is a delay of getting inputs in all the clocks. 2. Synchronous Counters In these types of counters, the clock input is given simultaneously to all the flip-flops at once.
  • 27. 27 Counters : Ripple Counter A ripple counter is a cascaded arrangement of flip-flops where the output of one flip-flop drives the clock input of the following flip-flop. In a ripple counter, the clock input is applied only to the first flip-flop, also called the input flip-flop, in the cascaded arrangement. The output of the first flip-flop acts as the clock input to the second flip-flop, the output of the second flip-flop is the clock input of the third flip-flop and so on. In general, in an arrangement of n flip-flops, the clock input to the nth flip-flop comes from the output of the (n − 1) th flip-flop for n > 1. Delay in the clock input can be counted by : n x propagation delay of one flip flop. Limitation : All FFs cannot change their state at the same time as the clock signal is not available to all the FFs at the same time.
  • 29. 29 Counters : Synchronous Counters Also known as parallel counters. all the flip-flops in the counter change state at the same time in synchronism with the input clock signal. The clock signal is simultaneously applied to the clock inputs of all the flip-flops. The delay involved in this case is equal to the propagation delay of one flip-flop only, irrespective of the number of flip-flops used to construct the counter.
  • 30. 30 Counters : Binary Ripple Counter A binary ripple counter consists of a series connection of complementing flip-flops in which the output of each flip-flop is connected to the C input of the next higher-order flip-flop. The output of the first flip-flop feeds the clock input of the second, and the output of the second flip-flop feeds the clock input of the third and so on. The flip flop here is made by using negative edge triggerreing flip flops.
  • 31. 31 Counters : Binary Ripple Counter The flip flop holding the LSB receives the input. For an incremental counter, the count starts with binary 0 and increments by one with receiving each clock input. After count 15, the counter goes back to 0 and begins the counter again. For an decremental counter, the count starts with binary 15 and decrements by one with receiving each clock input. After count 0, the counter goes back to 15 and begins the counter again.
  • 32. 32 Counters : Binary Ripple Counter .
  • 33. 33 Registers . Types of registers: • Shift registers such as ▪ Serial ln Serial Out ▪ Serial In Parallel Out ▪ Parallel In Serial Out ▪ Parallel In Parallel Out Register: − A set of n flip-flops − Each flip-flop stores one bit − Two basic functions: data storage and data
  • 34. 34 Registers- Shift Registers A shift register is a digital device used for storage and transfer of data. The shift register forms an important link between the main digital system and the input/output channels. The task of the shift register is - allow each of the flip flop to pass stored data to its adjacent register. - design counters for arithmetic operations The basic building block of a shift register is the D- Flip Flop. The storage capacity of a shift register depends on the number of flip flops used to design the shift register. Shift registers are classified based on the method of load data and read data from shift registers.
  • 35. 35 Shift Registers – Serial In Serial Out The SISO register accepts the data serially, i.e. one bit at a time on a single line. The output is also produced serially, one bit at a time. Circuit/ Symbol Representation
  • 36. 36 Shift Registers – Serial In Serial Out The SISO register accepts the data serially, i.e. one bit at a time on a single line. The output is also produced serially, one bit at a time. The operation of the shift register is as follows: 1. The register is first cleared, forcing all four outputs to zero. 2. The input data is then applied sequentially to the D input of the first flip-flop on the left (QA). 3. During each clock pulse, one bit is transmitted from left to right. 4. Assume a data word to be 1001. 5. The least significant bit of the data has to be shifted through the register from QA to QD. In order to get the data out of the register, they must be shifted out serially. Circuit/ Symbol Representation
  • 37. 37 Shift Registers – Serial In Serial Out The clock corresponds to the rising edge of the serial input. If the serial input goes from 0 to 1 just before CK pulse 1, the Q output of flip-flop QA will go high at the rising edge of CK pulse 1. At the next clock pulse rising edge, the logic 1 will be transferred to QB and so on until it reaches QD, and the serial output. Circuit/ Symbol Representation
  • 38. 38 Shift Registers – Serial In Serial Out
  • 39. 39 Shift Registers – Serial In Parallel Out In a SIPO, the register is loaded with serial data, one bit at a time, with the stored data being available at the output in a parallel form. An 8-bit SIPO Register
  • 40. 40 Shift Registers – Serial In Parallel Out The gated serial inputs A and B control the incoming serial data and to enable the shift register. Once the data are stored, each bit appears on its respective shift register output line, and all bits are available simultaneously.
  • 41. 41 Shift Registers – Parallel In Serial Out In PISO register, he parallel data is loaded into the register simultaneously and is shifted out of the register serially one bit at a time under clock control. D0, D1, D2 and D3 are the parallel inputs, where D0 is the most significant bit and D3 is the least significant bit. To write data in, the mode control line is taken to LOW and the data is clocked in. The data can be shifted when the mode control line is HIGH as SHIFT is active high
  • 42. 42 Shift Registers – Parallel In Serial Out
  • 43. 43 Shift Registers – Parallel In Parallel Out In PIPO register, the parallel data is loaded simultaneously into the register, and transferred together to their respective outputs by the same clock pulse. Here, D’s are the parallel inputs and Q’s are the parallel outputs. There is no interconnection between the individual flip-flops as no serial shifting of data is required.
  • 44. 44 Shift Registers – Parallel In Parallel Out