I want a circuit in which I get the following sequence:
0001,
0010,
0100,
1000,
0001
I know that it's 4-bit shift register. But what is my approach to design this circuit?
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It only takes a minute to sign up.
Sign up to join this communityI want a circuit in which I get the following sequence:
0001,
0010,
0100,
1000,
0001
I know that it's 4-bit shift register. But what is my approach to design this circuit?
One approach is to design the circuit as a regular two bit binary counter using a pair of flip-flops. Then you put some circuitry on the outputs that decodes the four counter states into the output sequence that you desire. Such decode functions actually already exist as standalone chips.
Here is the state table related to this:
Binary 00 -> Decode 0001
Binary 01 -> Decode 0010
Binary 10 -> Decode 0100
Binary 11 -> Decode 1000
Binary 00 -> Decode 0001
.....
[and so on]
There are other ways to make your recirculating shift register but they often have the problem of getting unwanted states in to the output stream such that more than one bit would be set at a time. The binary counter followed by decoder does not have that problem.
You may find it interesting to know that there is a commonly available chip that performs the counter and decoder operation all in one IC chip. The CD74HC4017 is one that does this with 10 output pins.
Write Up Your Truth Table as Usual ie
Current Next
A B C D | A' B' C' D'
0 0 0 1 | 0 0 1 0
0 0 1 0 | 0 1 0 0
0 1 0 0 | 1 0 0 0
1 0 0 0 | 0 0 0 1
Meaning A' = D , B' = C , C' = D, D' = A
So you now have the boolean equations defining your system, so you can now design your circuit.Because you want your signals A,B,C and D to be assigned only at clock edges you would then connect each of your output signals to the output of a flip flop then connect the input of the flip flop to the relevant logic equation.In this case you would just get a shift register.