A shift right moves every bit one place toward the LSB. With contents written Q3 Q2 Q1 Q0 (MSB on the left), the written number slides to the right:
- The serial input enters Q3.
- Each other bit takes the value of the bit on its left: D2 = Q3, D1 = Q2, D0 = Q1.
- The old Q0 drops out. It is the serial output of a shift-right register.
Quick method: cross off the rightmost bit and write SI on the left. 0110 with SI = 1 becomes 1011.
What enters on the left decides what the shift means:
- 0 enters: a logical shift right, which divides an unsigned number by 2.
- the old sign bit enters: an arithmetic shift right, which divides a signed number by 2.
- the old Q0 enters: a rotate right (see rotate).
- the complement of Q0 enters: a johnson counter.
Because every flip-flop samples its neighbor's value from before the edge, all bits move at once. Textbooks draw shift registers in different directions, so always check which end is the input before tracing.