How can I encode from 0000 to 11110 in a 4B / 5B encoding scheme

4B / 5B encoding

4B / 5B ecoding

From the 4B / 5B coding scheme, data 0000 in the encoded codeword 11110 is similarly 0001 encoded to 01001, etc.

Here, the result of an XOR operation between two codewords will be another valid codeword.

For example, XOR 11110 and 01001 is another codeword 10111, whose information word is 1011. If I have no problem.

Again, to avoid using the NRZ-I DC coding scheme, DC is used. As a result, there are no three consecutive zeros in the output codewords. There are no headers in the code words, but two zeros in the tail. We are not worried about the number of units in the NRZ-I coding scheme.

But how can I encode from 0000 to 11110 or from 0001 to 01001, and the algorithm that I have to apply for this encoding scheme.

I am also looking for Google and study books. But everywhere they say only the same thing, but I did not receive an answer.

thanks in advance

+5
source share
1 answer

Decimal representation

To correctly understand this mechanism, we must consider all the decimal values โ€‹โ€‹of the code words. Follow the table above, I converted all binary values โ€‹โ€‹of your table to decimal.

Now, in order to avoid the DC component during transmission, we should only consider code words that do not have more than one start and two tail tails. Thus, we get that every two consecutive data words are assigned to the other two consecutive code words.

Like this

(2.3) - (20.21),

(4,5) - (10,11)

(6.7) - (14.15)

(8.9) - (18.19)

(10.11) - (22.23)

(12, 13) - (26.27)

(14.15) - (28.29)

An exception

(0.1) - (30.9)

1 is assigned 9 because all codewords from 0 to 8 (inclusive) are invalid due to excess zero. Thus, the first valid codeword 9 is assigned 1. If all valid codewords are assigned sequentially, then when transmitting only one bit (one-bit error) during transmission, it will be converted to the next or previous codeword, and this error will go unnoticed.

We know that in block coding, if a valid codeword is converted to another valid codeword during transmission as a result of an error, it remains undetected, and this is a limitation of block coding. Therefore, to avoid this, all valid codewords are not assigned sequentially using words.

+4
source

Source: https://habr.com/ru/post/1269645/


All Articles