Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

4B/5B encoding

4B/5B ecoding

From the 4B/5B encoding scheme dataward 0000 in encoded to 11110 codeword similarly 0001 is encoded to 01001 etc.

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

For example XOR of 11110 and 01001 is another codeword 10111 whose dataword is 1011.Here I have no problem.

Again, to avoid dc component NRZ-I line coding scheme is used. As a result there is not three consecutive Zero's in the output codewords. There is no more one heading and two tailing zero's in codewords. We have no worry about the number of one's in NRZ-I coding scheme.

But, how can I encode 0000 to 11110 or 0001 to 01001 and which algorithm I should apply for this encoding scheme.

I search google and study books too. But everywhere they are telling only the same thing but I did not get my answer.

Thanks in advance

like image 341
S. M. Fahad Ahmad Avatar asked Jul 09 '17 01:07

S. M. Fahad Ahmad


People also ask

How do you use 4B 5B encoding?

4b/5b encoding is a type of 'Block coding'. This processes groups of bits rather than outputting a signal for each individual bit (as in Manchester encoding). A group of 4 bits is encoded so that an extra 5th bit is added. Since the input data is taken 4-bits at a time, there are 2^4, or 16 different bit patterns.

What is the main purpose of 4B 5B encoding?

4B5B codes are designed to produce at least two transitions per 5 bits of output code regardless of input data. The transitions provide necessary transitions for the receiver to perform clock recovery.

What is the purpose of first applying 4B 5B before using NRZ encoding?

4B/5B (four binary/five binary ) – The problem with NRZ-I was that it has a synchronization problem for long sequences of zeros. So, to overcome it we substitute the bit stream from 4-bit to 5-bit data group before encoding it with NRZ-I. So that it does not have a long stream of zeros.

Which encoding scheme make use of more than two signal levels for encoding?

8B/6T Encoding: In the above schemes, we have used two/three voltage levels for a signal. But we may altogether use more than three voltage levels so that more than one-bit could be send over a single signal. Like if we use six voltage levels and we use 8-bits then the scheme is called 8B/6T.


1 Answers

Decimal Representation

To understand this mechanism properly we should consider all codewords’ decimal value. Observe the above table carefully I converted all binary value of your table to decimal form.

Now to avoid dc component during transmission we should consider only the codewords which don’t have more than one starting and two tailing zeros . So we get every two consecutive datawords are assigned to another two consecutive codewords.

Like this

(2,3) to (20,21),

(4,5) to (10,11)

(6,7) to (14,15)

(8,9) to (18,19)

(10,11) to (22,23)

(12, 13) to (26,27)

(14,15) to (28,29)

Exception

(0,1) to (30,9)

1 is assigned to 9 because all codewords from 0 to 8 (inclusive) are invalid because of having excessive zero . So first valid codeword 9 is assigned to 1. If all valid codewords are assigned consecutively then changing only one bit (single bit error) during transmission it will convert to next or previous codeword and this error will remain undetected.

We know that in block coding if a valid codeword is convert to another valid codeword during transmission as a result of error , it will remain undetected and this a limitation of block coding. So to avoid this these all valid codewords are not consecutively assigned with datawords.

like image 189
Crazy Coder Avatar answered Sep 22 '22 09:09

Crazy Coder