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!!!
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!!!