Question about constructing a counter

Thread Starter

Ramiel

Joined Feb 19, 2018
65
Hi,
I have a hw to create a 3 bit up down counter and I should explan why it is better than other counters. I saw some examples on internet to understand the concept, but I have seen that all examples of counters used jk flip flop. I tried using T type flip flop and simulated it and it gave the same result as the jk flip flop. Since we only need the memory and toggle option why dont we use just t flip flop. Like is there an advantage of jk flip flops over t flip flops. The thing is that I have to construct a counter that is better than other counters, so i need the optimal option. Can someone explain why are jk flip flops used usually in examples and which one is better to create a counter with? Sorry for this lenghthy questions.
 

dl324

Joined Mar 30, 2015
8,848
Since this is homework, don't you think it would be unfair to your classmates if someone just told you the answer?

Put some effort into the problem yourself and tell us why you think one flip flop might be better than another.

The thing is that I have to construct a counter that is better than other counters, so i need the optimal option.
Good luck with that. Any possible optimization was done decades ago.
 

Thread Starter

Ramiel

Joined Feb 19, 2018
65
No I dont want a straightforward answer. I have constucted a 3 bit up/down counter firstly with jk flip flop, but then I thought to myslef that a t flip flop gives the same answer and it it simpler since it has only two possible outcomes ( memory and toggling) however jk flip flop has four possible outcomes ( memory, 0,1, and toggling) but in this type of counter I only need toggling to perform counting and memory to keep the counter at its present state. That was my conclusion, but I am not sure. I just need some lead or direction.
 

dl324

Joined Mar 30, 2015
8,848
I just need some lead or direction.
Look at the counters you designed and tell us if you see any advantages of one over the other. If you want feedback on your analysis, post schematics for your designs.
 

Thread Starter

Ramiel

Joined Feb 19, 2018
65
I really cant see any advantage over the other. The thing is that couners is not part of the curriculum. We have until sequential circuits, so I had to do my own studying. But I dont have enough information about them. I am only stuck at the part what flip flop to use to have a better counter.
 

WBahn

Joined Mar 31, 2012
24,671
Hi,
I have a hw to create a 3 bit up down counter and I should explan why it is better than other counters. I saw some examples on internet to understand the concept, but I have seen that all examples of counters used jk flip flop. I tried using T type flip flop and simulated it and it gave the same result as the jk flip flop. Since we only need the memory and toggle option why dont we use just t flip flop. Like is there an advantage of jk flip flops over t flip flops. The thing is that I have to construct a counter that is better than other counters, so i need the optimal option. Can someone explain why are jk flip flops used usually in examples and which one is better to create a counter with? Sorry for this lenghthy questions.
Before you (or anyone) can explain why A is better than B, let alone show that A is "optimal", first you must decide on what metric is to be used to judge quality? There are several and they tend to compete with each other meaning that improvement in one often degrades another. Some metrics might include power, area (transistor count), cost, speed, ease of design, maintainability, reliability, testability, scalability, flexability, visibility, etc.
 

Thread Starter

Ramiel

Joined Feb 19, 2018
65
I understand but it is my first semester as an electrical engineer. We barely reached sequential circuits. Like idk how to take these into considerations. I also have a brief knowledge about flip flops, so how am I supposed to sumbit such a hw, even though we were not taught anything about counters
 

dl324

Joined Mar 30, 2015
8,848
This how it looked when I did both, and they both gave the same result.
It's preferred for you to host files on this site so there won't be issues with broken links in the future (this website is archival in nature).
TFF.jpg JKFF.jpg
Printing from your logic simulator or doing screen captures would give better quality images...

By definition, counters implemented with different flip flops give the same results.

Have you studied the difference between synchronous and asynchronous (ripple) counters?
 
Last edited:

Thread Starter

Ramiel

Joined Feb 19, 2018
65
I just know that synchronous counters has all clocks connected to the same input clock. But asynchronous is not. That’s all I know. And the one I did is asynchronous as I believe.
 

dl324

Joined Mar 30, 2015
8,848
I just know that synchronous counters has all clocks connected to the same input clock. But asynchronous is not. That’s all I know. And the one I did is asynchronous as I believe.
Are there advantages of using synchronous vs asynchronous?
 

MrChips

Joined Oct 2, 2009
19,269
+1

Firstly, you need to understand the difference between an asynchronous counter and a synchronous counter.

For simple binary counters (divide by two), toggle flip-flops in asynchronous mode is the simplest way of cascading stages.

J-K flip-flops can do the same thing if J = 1 and K = 1.

A synchronous counter is a totally different matter.
 

Thread Starter

Ramiel

Joined Feb 19, 2018
65
Yeah I understand asynchronous counter where you give logic 1 as an input for j and k in jk flip flop and for t in t flip flop. My only question is which one is optimal as I have little ingo about them and I am still a beginner in those stuff.
 

WBahn

Joined Mar 31, 2012
24,671
Yeah I understand asynchronous counter where you give logic 1 as an input for j and k in jk flip flop and for t in t flip flop. My only question is which one is optimal as I have little ingo about them and I am still a beginner in those stuff.
There IS no "optimal". The reason why there are different kinds of flip flops and counters is precisely for that reason. If there was a universal "optimal" flip flop or counter, why would anyone make anything else? All design approaches have strengths and weakness and so what matters is what is important in a particular application. What is optimal in one application could be about the worst possible choice in another.

So for your homework, either forget about the notion of "optimal" and focus on describing the pros and cons of the different approaches, or pick some metric and evaluate the approaches according to that metric.
 

dl324

Joined Mar 30, 2015
8,848
Yeah I understand asynchronous counter where you give logic 1 as an input for j and k in jk flip flop and for t in t flip flop.
When you connect the J and K inputs to 1, you're making a JK flip flop act as a T flip flop. How you clock them is irrelevant.
 
Top