Flip Flop counter design

MrChips

Joined Oct 2, 2009
34,807
After a 100 posts you are still not seeing it!

Describe in words. What do you see?

0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 0
 

djsfantasi

Joined Apr 11, 2010
9,237
  • If you have an input of 1, what do you do to get a 2?
  • If you have a 3, what do you do to get a 6?
  • If you have a 2, what do you do to get a 4?
Is “what you do” the same in each case? That’s what WBahn’s little black box does.

You have figured out how to do this electronically in your previous answers. So to repeat here, what do you do electronically?

Finally, can you design your own circuit (or modify the one you have), to perform this operation?
 

Thread Starter

EYT1

Joined Apr 7, 2020
84
  • If you have an input of 1, what do you do to get a 2?
  • If you have a 3, what do you do to get a 6?
  • If you have a 2, what do you do to get a 4?
Is “what you do” the same in each case? That’s what WBahn’s little black box does.

You have figured out how to do this electronically in your previous answers. So to repeat here, what do you do electronically?

Finally, can you design your own circuit (or modify the one you have), to perform this operation?
I slide the bit to the left.
 

MrChips

Joined Oct 2, 2009
34,807
After so many posts I have come to the conclusion that the TS will never get.
Hence, here are the answers to so many questions that were asked in so many different ways.

0-6-4-2
There are four states.
Four states only require two flip-flops

D C B A
0 0 0 0
0 1 1 0
0 1 0 0
0 0 1 0

What do I see?
I see D and A are permanently 0. Hence I only need two flip flops, C and B.

What do I see when I compare 0-1-2-3 with 0-2-4-6?
0 = 0 0 0 0
1 = 0 0 0 1
2 = 0 0 1 0
3 = 0 0 1 1

0 = 0 0 0 0
2 = 0 0 1 0
4 = 0 1 0 0
6 = 0 1 1 0

0-2-4-6 is 0-1-2-3 multiplied by 2
I also see that 0-2-4-6 is the same as 0-1-2-3 shifted to the left by one position.
I conclude that shifting to the left by one position must be the same as multiplying by the base, which is 2 in this case.
(It is the same as 9876 x 10 = 98760.)

Compare
D C B A
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0

S R Q P
0 0 0 0
0 0 0 1
0 0 1 0
0 0 1 1

I see D and A are always 0. So I don't need flip-flops for these.
I see C B is the same as Q P. Hence I can put Q P in the same position as C B and get the same result.

D C B A
0 0 0 0
0 1 1 0
0 1 0 0
0 0 1 0

Finally, I see C B is 0-3-2-1 which is 0-1-2-3 counting backwards.
Can I use this observation in order to arrive at a simpler digital implementation?
How can I use a counter 0-1-2-3 and get the reverse pattern 0-3-2-1?
 

WBahn

Joined Mar 31, 2012
32,823
I could not fully understand the question, will we count the counter that outputs 0-6-4-2 as 3-2-1?
We have already established that if we have a counter that goes 0-2-3-1 and we shift the bits one place to the left on the display that what will be displayed will be 0-4-6-2.

The only two variables are the sequence that the counter outputs and how we hook it up to the display.

Working it from the other direction, IF what we had wanted was to display 0-4-6-2 then we know that moving the signals one place to the left would have resulted in the displayed sequence 0-2-3-1 and we know how to make a two-FF counter that outputs that sequence. So we build a two-FF counter that outputs 0-2-3-1 and connect it to the display with the bits shifted one position to the left of where we would normally connect them and the displayed sequence we get is 0-4-6-2, just like we wanted.

Now just use that exact same reasoning to explain how we can design a build a circuit, using just two FFs, that outputs the sequence 0-6-4-2.
 
Top