Help needed on a digital logic problem.

Thread Starter

sky333

Joined Jan 17, 2010
3
Hi, all. I am trying to use gates exclusively to implement such a problem:
in a binary sequence, the 0s divide it into several subsequence i.e. 1s. For the subsequence with even length, the corresponding output should be 0101...(same length). For the odd length, the corresponding output should be 10101...(same length).
e.g. if we have 0 1 1 1 1 0 1 1 1 1 1 0 1 1 0 0
then the output is 0 0 1 0 1 0 1 0 1 0 1 0 0 1 0 0
Requirment: the time cost by the logic circuit does not depend
on the word length.

Any help will be greatly appreciated!!!
 

Thread Starter

sky333

Joined Jan 17, 2010
3
if we have 0 1 1 1 1 0 1 1 1 1 1 0 1 1 0 0;
the segments are 1 1 1 1 ; 1 1 1 1 1 and 1 1. So the corresponding output should be
0 1 0 1; 1 0 1 0 1 and 0 1.
That is 0 0 1 0 1 0 1 0 1 0 1 0 0 1 0 0. Requirment: the time cost by the logic circuit does not depend on the word length. Thanks any way.
 

zgozvrm

Joined Oct 24, 2009
115
I understand how the output is to be determined from the input, but my question is this:
Is there a maximum input length (number of bits)?

Also, is there a maximum length for a string of 1's?
 
Last edited:

Thread Starter

sky333

Joined Jan 17, 2010
3
No, we can assume it to be 20 for example. (I mean 20 for both maximum input length and maximum length for a string of 1's).
 

frankv

Joined Jan 23, 2010
5
I assume the input is a stream of bits sequentially on a single channel. e.g. a 300 bps stream? So one bit of the input will be 333ms long?

And the output also needs to be a single stream of bits, at the same rate as the input stream?

If you want it in real time, then you can't do it.

You can't tell what the first bit of the output subsequence is until you're received the last bit of the input subsequence.

If there is an absolute maximum subsequence length (e.g. 20 bits), and you're prepared to delay by that much, then I guess it is possible.

Can you tell us *why* you want to do this? Or is it just a thought experiment?
 
Top