1. (60 points) Design a four-bit bidirectional shift registerwith three inputs: CLK, M, and X. When M=0, the shift register willshift to the left and the value of X will be placed at the rightend of the shift register. When M=1, the shift register will shiftto the right and the value of X will be placed at the left end ofthe shift register. The shift register will shift in the directionbased on the value of M on the negative edge of the clock.
Answer