adding processing for simulation

Keep working on the shift register.