How many flip-flop per state?

  • Thread starter success2be
  • Start date
  • Tags
    Per State
In summary, The design requires a clocked synchronous state machine with two inputs, X and Y, and one output, Z. The output should be 1 if the number of 1 inputs on X and Y since reset is a multiple of 4, and 0 otherwise. It is possible to achieve this with only four states, as the output is determined by the number of inputs received modulo 4. It is suggested to use three flip-flops in the design, with the third flip-flop accounting for the reset state. Unused states should be designed to vector back to a legal state.
  • #1
success2be
9
0
How many flip-flops do I need based on the following requirement? I'm thinking 2 flip-flop since each flip-flop can be a 0 or 1. So each flip-flop holds 2 states.

Design a clocked synchronous state machine with two inputs, X and Y, and one output, Z. The output should be 1 if the number of 1 inputs on X and Y since reset is a multiple of 4, and 0 otherwise.

At first glance, you might think the machine needs an infinite number of states, since it counts 1 inputs over an arbitrarily long time. However, since the output indicates the number of inputs received modulo 4, four states are sufficient.
 
Engineering news on Phys.org
  • #2
I think it may require one more FF for a total of three FFs. Hint -- don't forget the Reset state in your state diagram...
 
  • #3
Oh, and with 3 FFs, you will end up having some unused states. Be sure to design your logic circuit so that if you end up in one of those illegal states, you vector back to a legal state (usually the Reset state).
 
  • #4
I don't think I'm understanding the requirements correctly.

When does Z output 1? It reads as if Z outputs 1 when X & Y are 1, but then why do I need 4 states / 4 modulus?
 
  • #5
Here's a little bigger hint, but hopefully not the whole answer. I'd start with a list of the states something like the following:

0 = 0b000 = reset or idle state (or sum=0 for multiple clocks)
1 = 0b001 : sum=sum+X+Y=multiple of 1; Z=0
2 = 0b002 : sum=sum+X+Y=multiple of 2; Z=0
3 = 0b003 : sum=sum+X+Y=multiple of 3; Z=0
4 = 0b004 : sum=sum+X+Y=multiple of 4; Z=1
5 unused state
6 unused state
7 unused state
 

What is a flip-flop?

A flip-flop is a type of electronic circuit that can store a single bit of information. It consists of two stable states, 0 and 1, and can maintain these states until it receives a new input.

How does a flip-flop work?

A flip-flop works by using two stable states and a clock signal to regulate when it can change states. When the clock signal is triggered, the flip-flop will either switch to its opposite state or maintain its current state, depending on the input it receives.

Why is the number of flip-flops per state important?

The number of flip-flops per state is important because it determines the amount of information that can be stored in a circuit. Each flip-flop can store one bit of information, so the more flip-flops per state, the more information can be stored.

How do I calculate the number of flip-flops per state?

The number of flip-flops per state can be calculated by dividing the total number of bits in a circuit by the number of bits that can be stored in a single flip-flop. For example, if a circuit has 16 bits and each flip-flop can store 4 bits, then there are 4 flip-flops per state.

What is the relationship between flip-flops per state and memory capacity?

The relationship between flip-flops per state and memory capacity is directly proportional. As the number of flip-flops per state increases, so does the memory capacity of a circuit. This is because more flip-flops allow for more information to be stored in a circuit.

Similar threads

  • Electrical Engineering
Replies
5
Views
981
  • Electrical Engineering
Replies
4
Views
8K
  • Engineering and Comp Sci Homework Help
Replies
20
Views
2K
  • Electrical Engineering
Replies
10
Views
3K
  • Electrical Engineering
Replies
6
Views
3K
  • Electrical Engineering
Replies
5
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
9
Views
2K
  • Electrical Engineering
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Electrical Engineering
Replies
4
Views
1K
Back
Top