SlideShare a Scribd company logo
Prepared by: Ketaki Pattani
Enroll. No. 130210107039
College : GEC, Bhavnagar
Counters
Definition:
• Counter : A sequential circuit that goes through prescribed
sequence of states upon the application of clock pulse is
called a counter.
• The input pulses are called count pulses, may be clock pulses
or they may originate from an external source or occur at
prescribed intervals or at random.
• In a counter the sequence of states may follow binary count
or any other sequence.
• Counters are found in almost all equipment containing digital
system
Binary Counter :
• Binary Counter : A counter that follows the binary
sequence is called a Binary counter.
• An n-bit Binary Counter consists of n flipflops and
can count in binary from 0 to 2n-1.
• For eg. Binary counter for two digits is as follows:
Present State Next State
A B A B
0 0 0 1
0 1 1 0
1 0 1 1
1 1 0 0
00 01
1011
1
11
1
Example of binary counter
00 01
1011
0
0
0
10 1
1
1
Present State Inputs Next State
Q1 Q0 X Q1 Q0
0 0 0 0 1
0 0 1 1 1
0 1 0 1 0
0 1 1 0 0
1 0 0 1 1
1 0 1 0 1
1 1 0 0 0
1 1 1 1 0
• Here’s the another example for binary counter and its state
table:
Applications of Counters
• Some of the applications of counters in a
sequential circuits are as follows:
To count the number of occurances
Generating Timing sequences
Count up or down
Increment or decrement count
Sequence events
Divide frequency
Address memory
As temporary memory
Two principal categories
• Counters are divided in two categories, these
are:
– Asynchronous (Ripple) Counters - the first flip-flop
is clocked by the external clock pulse, and then
each successive flip-flop is clocked by the Q or Q'
output of the previous flip-flop.
– Synchronous Counters - all memory elements are
simultaneously triggered by the same clock.
Few other categories of counters:
• Apart from synchronous and asynchronous
counters which are the major ones the other
types of counters are as follows:
–Ring counter
–Johnson counter
–Decade counter
–Up–down counter
Asynchronous Counters:
• Here flipflop output transition serves as a source for
triggering other flipflops.
• This means that that the clockpulse is provided to a
single flipflop
• The change of state of a given flipflop is dependent
on the states of other flipflops.
• In other words the flipflops are not triggered by
simultanous clock pulses but the transitions in other
flipflops.
Asynchronous Counters
• This counter is called
asynchronous because not all flip
flops are have the same clock.
• Look at the waveform of the
output, Q, in the timing diagram.
It resembles a clock as well.
• This provides a clock that runs
twice as slow. If we feed the
clock into a T flip flop, where T is
hardwired to 1. The output will
be a clock who's period is twice
as long.
Two-bit asynchronous counter
• The external clock is
connected to the clock
input of the first flip-flop
only.
• So, it changes state at the
negative edge of each
clock pulse, but the next
flipflop changes only
when triggered by the
negative edge of the Q
output of the first one.
Two-bit asynchronous counter
• Because of the inherent
propagation delay through a
flip-flop, the transition of
the input clock pulse and a
transition of the Q output of
FF0 can never occur at
exactly the same time.
• Therefore, the flip-flops
cannot be triggered
simultaneously, producing
an asynchronous operation.
• Eg : As shown, there is some
small delay between the
CLK, Q0 and Q1 transitions.
Two-bit asynchronous counter
• Usually, all the CLEAR inputs are connected together,
so that a single pulse can clear all the flip-flops
before counting starts.
• The 2-bit ripple counter circuit above has four
different states, each one corresponding to a count
value.
• Similarly, a counter with n flip-flops can have 2N
states.
• The number of states in a counter is known as its
mod (modulo) number.
Two-bit asynchronous counter
• Thus a 2-bit counter is a
mod-4 counter.
• This is because the
most significant flip-flop
produces one pulse for
every n pulses at the
clock input of the least
significant flip-flop .
.
3 bit asynchronous “ripple” counter
using T flip flops
• This is called as a ripple
counter due to the way the
FFs respond one after
another in a kind of
rippling effect.
Synchronous Counters
• To eliminate the "ripple" effects, use a common clock for each flip-
flop and a combinational circuit to generate the next state.
• For an up-counter,
use an incrementer =>
D3 Q3
D2 Q2
D1 Q1
D0 Q0
Clock
Incre-
menter
A3
A2
A1
A0
S3
S2
S1
S0
Synchronous Counters
• To eliminate the "ripple" effects, use a common clock
for each flip-flop and a combinational circuit to
generate the next state.
• Hence the counters in which all the flipflops are
provided with a clock pulse simultanously are called
the Synchronous counters.
• Synchronous counters may be of the following types
– Up counter
– Down counter
• Internal details =>
• Internal Logic
– XOR complements each bit
– AND chain causes complement
of a bit if all bits toward LSB
from it equal 1
• Count Enable
– Forces all outputs of AND
chain to 0 to “hold” the state
• Carry Out
– Added as part of incrementer
– Connect to Count Enable of
additional 4-bit counters to
form larger counters
Synchronous Counters (continued)
Incrementer
Design Example: Synchronous BCD
• Use the sequential logic model to design a synchronous BCD counter with
D flip-flops
• State Table =>
• Input combinations
1010 through 1111
are don’t cares
Current State
Q8 Q4 Q2 Q1
Next State
Q8 Q4 Q2 Q1
0 0 0 0 0 0 0 1
0 0 0 1 0 0 1 0
0 0 1 0 0 0 1 1
0 0 1 1 0 1 0 0
0 1 0 0 0 1 0 1
0 1 0 1 0 1 1 0
0 1 1 0 0 1 1 1
0 1 1 1 1 0 0 0
1 0 0 0 1 0 0 1
1 0 0 1 0 0 0 0
Synchronous BCD (continued)
• Use K-Maps to two-level optimize the next state
equations and manipulate into forms containing XOR
gates:
D1 = Q1’
• D2 = Q2 + Q1Q8’
D4 = Q4 + Q1Q2
D8 = Q8 + (Q1Q8 + Q1Q2Q4)
• Y = Q1Q8
• The logic diagram can be drawn from these equations
– An asynchronous or synchronous reset should be added
Synchronous BCD (continued)
• There are chances that
counter is perturbed by a
power disturbance or other
interference and it enters a
state other than 0000
through 1001.
• Find the actual values of the
six next states for the don’t
care combinations from the
equations
• Find the overall state
diagram to assess behavior
for the don’t care states
(states in decimal)
. Present State Next State
Q8 Q4 Q2 Q1 Q8 Q4 Q2 Q1
1 0 1 0 1 0 1 1
1 0 1 1 0 1 1 0
1 1 0 0 1 1 0 1
1 1 0 1 0 1 0 0
1 1 1 0 1 1 1 1
1 1 1 1 0 0 1 0
Unused states
• The examples shown so
far have all had 2n
states,
and used n flip-flops. But
sometimes you may have
unused, leftover states.
• For example, here is a
state table and diagram
for a counter that
repeatedly counts from 0
(000) to 5 (101).
• But there are also the
unused states in the state
table.
. Present State Next State
Q2 Q1 Q0 Q2 Q1 Q0
0 0 0 0 0 1
0 0 1 0 1 0
0 1 0 0 1 1
0 1 1 1 0 0
1 0 0 1 0 1
1 0 1 0 0 0
1 1 0 ? ? ?
1 1 1 ? ? ?
001
010
011
100
101
000
Unused states can be don’t cares…
• To get the simplest possible
circuit, one can fill in don’t
cares for the next states.
This will also result in don’t
cares for the flip-flop inputs,
which can simplify the
hardware.
• If the circuit somehow ends
up in one of the unused
states (110 or 111), its
behavior will depend on
exactly what the don’t cares
were filled in with.
.
Present State Next State
Q2 Q1 Q0 Q2 Q1 Q0
0 0 0 0 0 1
0 0 1 0 1 0
0 1 0 0 1 1
0 1 1 1 0 0
1 0 0 1 0 1
1 0 1 0 0 0
1 1 0 x x x
1 1 1 x x x
001
010
011
100
101
000
Other possibility
• To get the safest possible
circuit, you can explicitly
fill in next states for the
unused states 110 and
111.
• This guarantees that even
if the circuit somehow
enters an unused state, it
will eventually end up in a
valid state.
• This is called a self-
starting counter.
.Present State Next State
Q2 Q1 Q0 Q2 Q1 Q0
0 0 0 0 0 1
0 0 1 0 1 0
0 1 0 0 1 1
0 1 1 1 0 0
1 0 0 1 0 1
1 0 1 0 0 0
1 1 0 0 0 0
1 1 1 0 0 0
001
010
011
100
101
000
111110
Ring counters are implemented as shown where output of a flipflop is
given as an input to the next flipflop except the last one. Here the
normal output of the last flipflop is connected back to the input of the
first one. Hence it is called Ring counter.
Ring Counter
Johnson Counter
The Johnson counter, also known as the twisted-ring counter,
is exactly the same as the ring counter except that the inverted
output of the last flip-flop is connected to the input of the first
flip-flop.
If it starts from 000, 100, 110, 111, 011 and 001, and the
sequence is repeated so long as there is input pulse.
Counters

More Related Content

What's hot

Sequential Logic Circuit
Sequential Logic CircuitSequential Logic Circuit
Sequential Logic Circuit
Ramasubbu .P
 
Flip-Flop || Digital Electronics
Flip-Flop || Digital ElectronicsFlip-Flop || Digital Electronics
Flip-Flop || Digital Electronics
Md Sadequl Islam
 
sequential circuits
sequential circuitssequential circuits
sequential circuits
Unsa Shakir
 
Introduction to Counters
Introduction to CountersIntroduction to Counters
Introduction to Counters
ISMT College
 
Latches and flip flop
Latches and flip flopLatches and flip flop
Latches and flip flop
Shuaib Hotak
 
Sequential circuits in Digital Electronics
Sequential circuits in Digital ElectronicsSequential circuits in Digital Electronics
Sequential circuits in Digital Electronics
Vinoth Loganathan
 
Shift Registers
Shift RegistersShift Registers
Shift Registers
Abhilash Nair
 
flip flop circuits and its applications
flip flop circuits and its applicationsflip flop circuits and its applications
flip flop circuits and its applications
Gaditek
 
Registers
RegistersRegisters
Registers
Sanjeev Patel
 
latches
 latches latches
latches
Unsa Shakir
 
Combinational circuit
Combinational circuitCombinational circuit
Combinational circuit
SIVALAKSHMIPANNEERSE
 
Registers
RegistersRegisters
Registers
Gaditek
 
Multiplexer and DeMultiplexer
Multiplexer and DeMultiplexerMultiplexer and DeMultiplexer
Multiplexer and DeMultiplexer
Estiak Khan
 
Counters, Synchronous & Asynchronous Counters
Counters, Synchronous & Asynchronous CountersCounters, Synchronous & Asynchronous Counters
Counters, Synchronous & Asynchronous Counters
Bony Yamin
 
MULTIPLEXER
MULTIPLEXERMULTIPLEXER
MULTIPLEXER
Siddhi Shrivas
 
Presentation on Flip Flop
Presentation  on Flip FlopPresentation  on Flip Flop
Presentation on Flip Flop
Nahian Ahmed
 
Latches & flip flop
Latches & flip flopLatches & flip flop
Latches & flip flop
Nousheen Arshad
 
Half adder & full adder
Half adder & full adderHalf adder & full adder
Half adder & full adder
Gaditek
 
Synchronous Counter
Synchronous Counter Synchronous Counter
Synchronous Counter
Akhilesh Kushwaha
 
Latches and flip flops
Latches and flip flopsLatches and flip flops
Latches and flip flops
mubashir farooq
 

What's hot (20)

Sequential Logic Circuit
Sequential Logic CircuitSequential Logic Circuit
Sequential Logic Circuit
 
Flip-Flop || Digital Electronics
Flip-Flop || Digital ElectronicsFlip-Flop || Digital Electronics
Flip-Flop || Digital Electronics
 
sequential circuits
sequential circuitssequential circuits
sequential circuits
 
Introduction to Counters
Introduction to CountersIntroduction to Counters
Introduction to Counters
 
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
 
Shift Registers
Shift RegistersShift Registers
Shift Registers
 
flip flop circuits and its applications
flip flop circuits and its applicationsflip flop circuits and its applications
flip flop circuits and its applications
 
Registers
RegistersRegisters
Registers
 
latches
 latches latches
latches
 
Combinational circuit
Combinational circuitCombinational circuit
Combinational circuit
 
Registers
RegistersRegisters
Registers
 
Multiplexer and DeMultiplexer
Multiplexer and DeMultiplexerMultiplexer and DeMultiplexer
Multiplexer and DeMultiplexer
 
Counters, Synchronous & Asynchronous Counters
Counters, Synchronous & Asynchronous CountersCounters, Synchronous & Asynchronous Counters
Counters, Synchronous & Asynchronous Counters
 
MULTIPLEXER
MULTIPLEXERMULTIPLEXER
MULTIPLEXER
 
Presentation on Flip Flop
Presentation  on Flip FlopPresentation  on Flip Flop
Presentation on Flip Flop
 
Latches & flip flop
Latches & flip flopLatches & flip flop
Latches & flip flop
 
Half adder & full adder
Half adder & full adderHalf adder & full adder
Half adder & full adder
 
Synchronous Counter
Synchronous Counter Synchronous Counter
Synchronous Counter
 
Latches and flip flops
Latches and flip flopsLatches and flip flops
Latches and flip flops
 

Similar to Counters

Synchronous Sequential Logic Unit 4
Synchronous Sequential Logic Unit 4Synchronous Sequential Logic Unit 4
Synchronous Sequential Logic Unit 4
Asif Iqbal
 
Basics Counters
Basics Counters Basics Counters
Basics Counters
Danial Mirza
 
Chapter 7_Counters (EEEg4302).pdf
Chapter 7_Counters (EEEg4302).pdfChapter 7_Counters (EEEg4302).pdf
Chapter 7_Counters (EEEg4302).pdf
TamiratDejene1
 
Computer system architecture 16 counters
Computer system architecture 16 countersComputer system architecture 16 counters
Computer system architecture 16 counters
thearticlenow
 
Digital Counter Design
 Digital Counter Design Digital Counter Design
Digital Counter Design
GargiKhanna1
 
Presentation on Counters for (Digital Systems Design).pptx
Presentation on Counters for (Digital Systems Design).pptxPresentation on Counters for (Digital Systems Design).pptx
Presentation on Counters for (Digital Systems Design).pptx
Aniruddh70
 
Counter with memes
Counter with memesCounter with memes
Counter with memesLee Diaz
 
Counter with memes
Counter with memesCounter with memes
Counter with memesLee Diaz
 
Counters r012
Counters  r012Counters  r012
Counters r012
arunachalamr16
 
counters.ppt
counters.pptcounters.ppt
counters.ppt
NarendrakumarAnnadur
 
COUNTERS.pptx
COUNTERS.pptxCOUNTERS.pptx
COUNTERS.pptx
SaifURehmanSidhu
 
Unit4_DE.pptx
Unit4_DE.pptxUnit4_DE.pptx
Unit4_DE.pptx
PriyankaJain98423
 
Synchronous down counter
Synchronous down counterSynchronous down counter
Synchronous down counter
RONAK SUTARIYA
 
Digital counter
Digital counter Digital counter
Digital counter
Bhaskar Kumar Jha
 
COUNTERS(Synchronous & Asynchronous)
COUNTERS(Synchronous & Asynchronous)COUNTERS(Synchronous & Asynchronous)
COUNTERS(Synchronous & Asynchronous)
SUBHA SHREE
 
COUNTERS(Synchronous & Asynchronous)
COUNTERS(Synchronous & Asynchronous)COUNTERS(Synchronous & Asynchronous)
COUNTERS(Synchronous & Asynchronous)
Sairam Adithya
 
COUNTERS [Synchronous and Asynchronous]
COUNTERS [Synchronous and Asynchronous]COUNTERS [Synchronous and Asynchronous]
COUNTERS [Synchronous and Asynchronous]
Electronics for Biomedical
 

Similar to Counters (20)

Synchronous Sequential Logic Unit 4
Synchronous Sequential Logic Unit 4Synchronous Sequential Logic Unit 4
Synchronous Sequential Logic Unit 4
 
Basics Counters
Basics Counters Basics Counters
Basics Counters
 
Chapter 7_Counters (EEEg4302).pdf
Chapter 7_Counters (EEEg4302).pdfChapter 7_Counters (EEEg4302).pdf
Chapter 7_Counters (EEEg4302).pdf
 
Computer system architecture 16 counters
Computer system architecture 16 countersComputer system architecture 16 counters
Computer system architecture 16 counters
 
Digital Counter Design
 Digital Counter Design Digital Counter Design
Digital Counter Design
 
Presentation on Counters for (Digital Systems Design).pptx
Presentation on Counters for (Digital Systems Design).pptxPresentation on Counters for (Digital Systems Design).pptx
Presentation on Counters for (Digital Systems Design).pptx
 
Counter with memes
Counter with memesCounter with memes
Counter with memes
 
Counter with memes
Counter with memesCounter with memes
Counter with memes
 
Counter
CounterCounter
Counter
 
Counters r012
Counters  r012Counters  r012
Counters r012
 
counters.ppt
counters.pptcounters.ppt
counters.ppt
 
COUNTERS.pptx
COUNTERS.pptxCOUNTERS.pptx
COUNTERS.pptx
 
Unit4_DE.pptx
Unit4_DE.pptxUnit4_DE.pptx
Unit4_DE.pptx
 
Synchronous down counter
Synchronous down counterSynchronous down counter
Synchronous down counter
 
Digital counter
Digital counter Digital counter
Digital counter
 
Counters
CountersCounters
Counters
 
Counters
CountersCounters
Counters
 
COUNTERS(Synchronous & Asynchronous)
COUNTERS(Synchronous & Asynchronous)COUNTERS(Synchronous & Asynchronous)
COUNTERS(Synchronous & Asynchronous)
 
COUNTERS(Synchronous & Asynchronous)
COUNTERS(Synchronous & Asynchronous)COUNTERS(Synchronous & Asynchronous)
COUNTERS(Synchronous & Asynchronous)
 
COUNTERS [Synchronous and Asynchronous]
COUNTERS [Synchronous and Asynchronous]COUNTERS [Synchronous and Asynchronous]
COUNTERS [Synchronous and Asynchronous]
 

Recently uploaded

The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
Steve Thomason
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
Celine George
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
Col Mukteshwar Prasad
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 

Recently uploaded (20)

The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 

Counters

  • 1. Prepared by: Ketaki Pattani Enroll. No. 130210107039 College : GEC, Bhavnagar Counters
  • 2. Definition: • Counter : A sequential circuit that goes through prescribed sequence of states upon the application of clock pulse is called a counter. • The input pulses are called count pulses, may be clock pulses or they may originate from an external source or occur at prescribed intervals or at random. • In a counter the sequence of states may follow binary count or any other sequence. • Counters are found in almost all equipment containing digital system
  • 3. Binary Counter : • Binary Counter : A counter that follows the binary sequence is called a Binary counter. • An n-bit Binary Counter consists of n flipflops and can count in binary from 0 to 2n-1. • For eg. Binary counter for two digits is as follows: Present State Next State A B A B 0 0 0 1 0 1 1 0 1 0 1 1 1 1 0 0 00 01 1011 1 11 1
  • 4. Example of binary counter 00 01 1011 0 0 0 10 1 1 1 Present State Inputs Next State Q1 Q0 X Q1 Q0 0 0 0 0 1 0 0 1 1 1 0 1 0 1 0 0 1 1 0 0 1 0 0 1 1 1 0 1 0 1 1 1 0 0 0 1 1 1 1 0 • Here’s the another example for binary counter and its state table:
  • 5. Applications of Counters • Some of the applications of counters in a sequential circuits are as follows: To count the number of occurances Generating Timing sequences Count up or down Increment or decrement count Sequence events Divide frequency Address memory As temporary memory
  • 6. Two principal categories • Counters are divided in two categories, these are: – Asynchronous (Ripple) Counters - the first flip-flop is clocked by the external clock pulse, and then each successive flip-flop is clocked by the Q or Q' output of the previous flip-flop. – Synchronous Counters - all memory elements are simultaneously triggered by the same clock.
  • 7. Few other categories of counters: • Apart from synchronous and asynchronous counters which are the major ones the other types of counters are as follows: –Ring counter –Johnson counter –Decade counter –Up–down counter
  • 8. Asynchronous Counters: • Here flipflop output transition serves as a source for triggering other flipflops. • This means that that the clockpulse is provided to a single flipflop • The change of state of a given flipflop is dependent on the states of other flipflops. • In other words the flipflops are not triggered by simultanous clock pulses but the transitions in other flipflops.
  • 9. Asynchronous Counters • This counter is called asynchronous because not all flip flops are have the same clock. • Look at the waveform of the output, Q, in the timing diagram. It resembles a clock as well. • This provides a clock that runs twice as slow. If we feed the clock into a T flip flop, where T is hardwired to 1. The output will be a clock who's period is twice as long.
  • 10. Two-bit asynchronous counter • The external clock is connected to the clock input of the first flip-flop only. • So, it changes state at the negative edge of each clock pulse, but the next flipflop changes only when triggered by the negative edge of the Q output of the first one.
  • 11. Two-bit asynchronous counter • Because of the inherent propagation delay through a flip-flop, the transition of the input clock pulse and a transition of the Q output of FF0 can never occur at exactly the same time. • Therefore, the flip-flops cannot be triggered simultaneously, producing an asynchronous operation. • Eg : As shown, there is some small delay between the CLK, Q0 and Q1 transitions.
  • 12. Two-bit asynchronous counter • Usually, all the CLEAR inputs are connected together, so that a single pulse can clear all the flip-flops before counting starts. • The 2-bit ripple counter circuit above has four different states, each one corresponding to a count value. • Similarly, a counter with n flip-flops can have 2N states. • The number of states in a counter is known as its mod (modulo) number.
  • 13. Two-bit asynchronous counter • Thus a 2-bit counter is a mod-4 counter. • This is because the most significant flip-flop produces one pulse for every n pulses at the clock input of the least significant flip-flop . .
  • 14. 3 bit asynchronous “ripple” counter using T flip flops • This is called as a ripple counter due to the way the FFs respond one after another in a kind of rippling effect.
  • 15. Synchronous Counters • To eliminate the "ripple" effects, use a common clock for each flip- flop and a combinational circuit to generate the next state. • For an up-counter, use an incrementer => D3 Q3 D2 Q2 D1 Q1 D0 Q0 Clock Incre- menter A3 A2 A1 A0 S3 S2 S1 S0
  • 16. Synchronous Counters • To eliminate the "ripple" effects, use a common clock for each flip-flop and a combinational circuit to generate the next state. • Hence the counters in which all the flipflops are provided with a clock pulse simultanously are called the Synchronous counters. • Synchronous counters may be of the following types – Up counter – Down counter
  • 17. • Internal details => • Internal Logic – XOR complements each bit – AND chain causes complement of a bit if all bits toward LSB from it equal 1 • Count Enable – Forces all outputs of AND chain to 0 to “hold” the state • Carry Out – Added as part of incrementer – Connect to Count Enable of additional 4-bit counters to form larger counters Synchronous Counters (continued) Incrementer
  • 18. Design Example: Synchronous BCD • Use the sequential logic model to design a synchronous BCD counter with D flip-flops • State Table => • Input combinations 1010 through 1111 are don’t cares Current State Q8 Q4 Q2 Q1 Next State Q8 Q4 Q2 Q1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 1 0 0 1 1 0 1 0 0 0 1 0 0 0 1 0 1 0 1 0 1 0 1 1 0 0 1 1 0 0 1 1 1 0 1 1 1 1 0 0 0 1 0 0 0 1 0 0 1 1 0 0 1 0 0 0 0
  • 19. Synchronous BCD (continued) • Use K-Maps to two-level optimize the next state equations and manipulate into forms containing XOR gates: D1 = Q1’ • D2 = Q2 + Q1Q8’ D4 = Q4 + Q1Q2 D8 = Q8 + (Q1Q8 + Q1Q2Q4) • Y = Q1Q8 • The logic diagram can be drawn from these equations – An asynchronous or synchronous reset should be added
  • 20. Synchronous BCD (continued) • There are chances that counter is perturbed by a power disturbance or other interference and it enters a state other than 0000 through 1001. • Find the actual values of the six next states for the don’t care combinations from the equations • Find the overall state diagram to assess behavior for the don’t care states (states in decimal) . Present State Next State Q8 Q4 Q2 Q1 Q8 Q4 Q2 Q1 1 0 1 0 1 0 1 1 1 0 1 1 0 1 1 0 1 1 0 0 1 1 0 1 1 1 0 1 0 1 0 0 1 1 1 0 1 1 1 1 1 1 1 1 0 0 1 0
  • 21. Unused states • The examples shown so far have all had 2n states, and used n flip-flops. But sometimes you may have unused, leftover states. • For example, here is a state table and diagram for a counter that repeatedly counts from 0 (000) to 5 (101). • But there are also the unused states in the state table. . Present State Next State Q2 Q1 Q0 Q2 Q1 Q0 0 0 0 0 0 1 0 0 1 0 1 0 0 1 0 0 1 1 0 1 1 1 0 0 1 0 0 1 0 1 1 0 1 0 0 0 1 1 0 ? ? ? 1 1 1 ? ? ? 001 010 011 100 101 000
  • 22. Unused states can be don’t cares… • To get the simplest possible circuit, one can fill in don’t cares for the next states. This will also result in don’t cares for the flip-flop inputs, which can simplify the hardware. • If the circuit somehow ends up in one of the unused states (110 or 111), its behavior will depend on exactly what the don’t cares were filled in with. . Present State Next State Q2 Q1 Q0 Q2 Q1 Q0 0 0 0 0 0 1 0 0 1 0 1 0 0 1 0 0 1 1 0 1 1 1 0 0 1 0 0 1 0 1 1 0 1 0 0 0 1 1 0 x x x 1 1 1 x x x 001 010 011 100 101 000
  • 23. Other possibility • To get the safest possible circuit, you can explicitly fill in next states for the unused states 110 and 111. • This guarantees that even if the circuit somehow enters an unused state, it will eventually end up in a valid state. • This is called a self- starting counter. .Present State Next State Q2 Q1 Q0 Q2 Q1 Q0 0 0 0 0 0 1 0 0 1 0 1 0 0 1 0 0 1 1 0 1 1 1 0 0 1 0 0 1 0 1 1 0 1 0 0 0 1 1 0 0 0 0 1 1 1 0 0 0 001 010 011 100 101 000 111110
  • 24. Ring counters are implemented as shown where output of a flipflop is given as an input to the next flipflop except the last one. Here the normal output of the last flipflop is connected back to the input of the first one. Hence it is called Ring counter. Ring Counter
  • 25. Johnson Counter The Johnson counter, also known as the twisted-ring counter, is exactly the same as the ring counter except that the inverted output of the last flip-flop is connected to the input of the first flip-flop. If it starts from 000, 100, 110, 111, 011 and 001, and the sequence is repeated so long as there is input pulse.