Logic and sequential control