###### Computer-Networks

September 8, 2024###### Computer-Networks

September 8, 2024# Computer-Networks

Question 57 |

In the 4B/5B encoding scheme, every 4 bits of data are encoded in a 5-bit codeword. It is required that the codewords have at most 1 leading and at most 1 trailing zero. How many such codewords are possible?

14 | |

16 | |

18 | |

20 |

Question 57 Explanation:

It says we have 5 bit codeword such that “it can’t have two consecutive zeros in first and second bit” and also “can’t have two consecutive zeros in last two bits”.

Codeword with first two bits ‘0’

= 0 0 x x x

= 2

= 8

Codeword with last two bits ‘0’

= x x x 0 0

= 2

= 8

Codeword with first two and last two bits ‘0’

= 0 0 x 0 0

= 2

Codeword with first or last two bits ‘0’

= 8 + 8 – 2

= 14

Therefore possible codewords

= 32 – 14

= 18

Codeword with first two bits ‘0’

= 0 0 x x x

= 2

^{3}= 8

Codeword with last two bits ‘0’

= x x x 0 0

= 2

^{3}= 8

Codeword with first two and last two bits ‘0’

= 0 0 x 0 0

= 2

Codeword with first or last two bits ‘0’

= 8 + 8 – 2

= 14

Therefore possible codewords

= 32 – 14

= 18

Correct Answer: C

Question 57 Explanation:

It says we have 5 bit codeword such that “it can’t have two consecutive zeros in first and second bit” and also “can’t have two consecutive zeros in last two bits”.

Codeword with first two bits ‘0’

= 0 0 x x x

= 2

= 8

Codeword with last two bits ‘0’

= x x x 0 0

= 2

= 8

Codeword with first two and last two bits ‘0’

= 0 0 x 0 0

= 2

Codeword with first or last two bits ‘0’

= 8 + 8 – 2

= 14

Therefore possible codewords

= 32 – 14

= 18

Codeword with first two bits ‘0’

= 0 0 x x x

= 2

^{3}= 8

Codeword with last two bits ‘0’

= x x x 0 0

= 2

^{3}= 8

Codeword with first two and last two bits ‘0’

= 0 0 x 0 0

= 2

Codeword with first or last two bits ‘0’

= 8 + 8 – 2

= 14

Therefore possible codewords

= 32 – 14

= 18

Subscribe

Login

0 Comments