# How a register shifts information to right at positive egde of clock

We have given the following question:

Design a 4-bit, shift-right register with D flip flops, and use two of these registers to implement a circuit that detects the sequence (x1,x0)=3,0,2,1 (the rightmost digit, "1" in this case, is the first going in, see example). Information shifts one position right each time a positive edge of CK arrives.

I know how a shift register works, but this thing Information shifts one position right each time a positive edge of CK arrives is confusing me a lot. I do not understand how can we implement a shift-register that shifts the information to right at positive edge of a clock.

MY ATTEMPT:

I have made the following circuit which is wrong:

I would be really thankful if someone would help me out and tell me if I a missing something or if I am wrong anywhere. Thanks in advanced.

• contradiction in terminis: I know how a shift register works, but this thing Information shifts one position right each time a positive edge of CK arrives is confusing me a lot. That is the basic of how a shift register works. – Oldfart Apr 6 '18 at 15:33
• how did you confirm that this ckt is wrong ? – Mitu Raj Apr 6 '18 at 16:08
• I am also totally lost in ---> I know how a shift register works, but this thing Information shifts one position right each time a positive edge of CK arrives is confusing me a lot <---- Thats what a shift register does ofcourse. – Mitu Raj Apr 6 '18 at 16:13
• Which is your Most Significant Bit ? x1 or x0? – nidhin Apr 6 '18 at 17:19
• @MITURAJ I confirmed it by the software provided to us. I made this circuit and when I checked my answer the software told 'The circuit behavior is wrong nad is not similar to the correct one'. – Khubaib Khawar Apr 6 '18 at 17:26

## 1 Answer

The sequence to be detected is (x1,x0)= 3,0,2,1. x1 is MSB, x0 is LSB. The output should therefore be triggered '1', when the four Flip-Flops are in the state:

x1 : 1 0 1 0

x0 : 1 0 0 1

But in your circuit, things are reversed. You have implemented it as x1 = LSB and x0 = MSB. Rest of the circuit looks fine.

• Thanks a lot @MITU RAJ. Yes after seeing your solution, I realized that I have swapped the inputs. Thank you so much. – Khubaib Khawar Apr 7 '18 at 4:49