Generation of a periodic 01010101... sequence
b = ts01(n)
number of bits to generate
output binary sequence
// Generation of a vector of 8 alternating bits b = ts01(8)