Issues with a SR flip-flops and an external input x truth table

Thread Starter

Dewy

Joined Oct 27, 2022
10
I am trying to construct a truth table for my SR Flip flop (SR flip-flops and an external input x, a circuit that will count modulo 10 (i.e. from zero to nine, then back to zero and repeat) can anyone let me know if I am on the right track
 

Attachments

WBahn

Joined Mar 31, 2012
30,060
Your table makes no sense. It's also incomplete. What is the purpose of the control input? Your state table shows it counting down regardless of the value of X.

When you say "back to zero" do you mean wrapping around (i.e., ...-8-9-0-1-...) or switching to counting down (i.e., ...-8-9-8-7-...). The former is proper "modulo-10" behavior.
 
Last edited:

Thread Starter

Dewy

Joined Oct 27, 2022
10
hi Dewy
When you say (i.e. from zero to nine, then back to zero
I expect you mean Reset to Zero.??
E
Yes, it should be reset back to 0.
The full question{using SR flip-flops and an external input x, a circuit that will count modulo 10 (i.e. from zero to nine, then back to zero and repeat). The circuit should only count when x = 1. If x = 0, there should be no change of state.}
 

Thread Starter

Dewy

Joined Oct 27, 2022
10
Your table makes no sense. It's also incomplete. What is the purpose of the control input? Your state table shows it counting down regardless of the value of X.

When you say "back to zero" do you mean wrapping around (i.e., ...-8-9-0-1-...) or switching to counting down (i.e., ...-8-9-8-7-...). The former is proper "modulo-10" behavior.
Yes it should wrap around
 

dl324

Joined Mar 30, 2015
16,922
I am trying to construct a truth table for my SR Flip flop (SR flip-flops and an external input x, a circuit that will count modulo 10 (i.e. from zero to nine, then back to zero and repeat) can anyone let me know if I am on the right track
Your count sequence is wrong. You said you wanted to count up, but your table (mostly) counts down. You also have a mistake at count=0.

You're missing the don't care counts which would likely allow you to simplify the logic. If you put the data in gray code order, it will be easier to transfer to Kmaps.

The circuit should only count when x = 1. If x = 0, there should be no change of state.}
Your table doesn't reflect this.
 

dl324

Joined Mar 30, 2015
16,922
The full question{using SR flip-flops and an external input x, a circuit that will count modulo 10 (i.e. from zero to nine, then back to zero and repeat). The circuit should only count when x = 1. If x = 0, there should be no change of state.}
This statement is ambiguous. You have interpreted "then back to zero" to mean 0-9,0-9,... vs 0-9,9-0,...

It could have been described more succinctly as a decade up counter with the control input. A modulo 10 counter simply has 10 different states. They don't need to be in sequence or monotonic.
 

Thread Starter

Dewy

Joined Oct 27, 2022
10
I have identified the issue and in the process of correcting it. But I have already completed the state diagramScreenshot 2022-11-18 120446.png
 
Last edited by a moderator:

WBahn

Joined Mar 31, 2012
30,060
I have identified the issue and in the process of correcting it. But I have already completed the state diagram
Read the following sentence from the problem statement very carefully and then compare it to your state diagram.

"If x = 0, there should be no change of state."
 

ericgibbs

Joined Jan 29, 2010
18,849
hi Dewy,
A 4 Stage F/F counter counts in Binary from '0000' to '1111' , looking at your Table why does it change from '1001' to '0000'. ?
E

BTW: A small point is the A,B,C,D. Conventionally it is written as D,C,B,A where 'A' is the LSB
 

dl324

Joined Mar 30, 2015
16,922
I added it there for visual purposes but I understand.
It's still wrong.
This were I am at with the truth table
I see two mistakes for the B flip flop.

It's sad that they're teaching you the wrong order for labeling flip flops. A should always be the LSB.

This is from a MC14495 datasheet I happened to be reading:
1668796801231.png

You're still leaving out the don't care lines that will allow you to simplify the logic and you're not using gray code order which makes it easier to transfer the data to a Kmap.
 

WBahn

Joined Mar 31, 2012
30,060
Honestly I added it there for visual purposes but I understand. This were I am at with the truth table
Your truth table still doesn't include what happens when x=0 and your state diagram, which does include it, is wrong.
 

dl324

Joined Mar 30, 2015
16,922
You're still leaving out the don't care lines that will allow you to simplify the logic and you're not using gray code order which makes it easier to transfer the data to a Kmap.
This is what I mean about the don't care lines and using gray code order. This is a mod 6 up counter.
mod6RSupTable.jpgmod6RSupKmapA.jpg
I didn't need to use a 4 variable table, but 4 is the smallest I've created in my spreadsheet. The transition information is generated and entered in the kmaps automatically. You shouldn't do this until you've memorized the transitions and mastered entering data in kmaps.

Using gray code order lets you transfer data to Kmaps without having to think much. Note how the don't cares allowed the expressions to be simplified.

The reason I used color in the kmap is so someone reading it can see the groupings used. Otherwise, I don't use colors.

When is your assignment due?
 
Last edited:
Top