32 bit binary counter

You are using a 400 millisecond delay, this means that the lights change 2.5 times per second. Try to increase your delay to 1000 (1 seconds) or more.

A side note: septillion's code may be easier to understand - but it basically does the same, just without the devil... I mean delay... :wink: