This applet demonstrates how to setup a CA from serial input.
The automaton works with 17 different states. The concept is easy: There are two different type of bits, inactive data bits and moving bits. Moving bits moves all the time left or right, depending on the direction bit, but a data bit moves only, if overlapped with a moving bit. The destination area is surounded by two different types of stoppers: The green one stops the moving bits and moves it one field up, the red stoppers moves data bits one field down. Every cell has a direction flag, if there is a data bit or a moving bit. The same direction bit means opposite directions for data and moving bits. For details look at the documented source code. The rules are coded in 120 lines of Java code.
The source: FBCellularAutomaton.java and FBCellularAutomatonCanvas.java