Texas Instruments interview question

shift register problem