Electronic – sequencing binary numbers

binary

Is there a method for sequencing 4-bit binary numbers, where no 4 consecutive bits are repeated anywhere else in the stream?

For example;

bit sequence diagram

Is there a method that would work for 5 and 6 bit numbers?


Thanks for all the great feedback. Here is some info on how the sequence is used:

Pictured below is the data placed on a wheel. As it spins, the bit stream is shifted into a software register from right to left. After 3 shifts, I have a valid number. After the 4th shift, I have the next number and because of its unique position in the sequence, I can associate it to a position on the wheel. Granted it’s not an absolute position system on power up, but after 4 shifts the position is found.

wheel diagram

I’ve expanded this to six bits, but the process was manual. I’m looking for help to make scaling-up a bit easier.

Thanks.

Best Answer

Yes it is a De Bruijn Sequence and based on an algorithm J. Tuliani wrote for his Thesis titled "On Window Sequences and Position Locations" the software community created this Sequence Generator;

De Bruijn Sequence

Thanks