The solution has two parts:
Erase zeros and ones pair-wise (
blue
states).
Set up the final world (
red
states).