Bit by bit

I wrote the following code to transform a series of comma separated numbers to alternating zeros and ones e.g. 4,3,4,3 is 00001110000111. But it could be so much better like so: My insight is that when the code goes bit by bit or character by character there must be a better way.