Binary sequence generator.