Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  In the 4B/5B encoding scheme, every 4 bits of... Start Learning for Free
In the 4B/5B encoding scheme, every 4 bits of data are encoded in a 5-bit codeword. It is required that the codewords haveat most 1 leading and at most 1 trailing zero. How many such codewords are possible?
  • a)
    14
  • b)
    16
  • c)
    18
  • d)
    20
Correct answer is option 'C'. Can you explain this answer?
Verified Answer
In the 4B/5B encoding scheme, every 4 bits of data are encoded in a 5-...
Answer is (C)
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.
Code word with first two bits zero = 0|0|x|x|x| =8
Code word with last two bits zero = |x|x|x|0|0| =8
Code word with first and last two bits zero = 0|0|x|0|0| =2
Code word with first OR last two bits zero = 8+8-2=14
Therefore possible codewords =32-14 =18
View all questions of this test
Most Upvoted Answer
In the 4B/5B encoding scheme, every 4 bits of data are encoded in a 5-...
The possible codewords should not have 00xxx or xxx00
=> Total possible combinations of 5 bits – for (00xxx or xxx00)+ (00*00) {as 00*00 is subtracted twice once each from both cases}
=> 232 – (8+8) +2 = 18

Free Test
Community Answer
In the 4B/5B encoding scheme, every 4 bits of data are encoded in a 5-...
Explanation:

To generate the 4B/5B codewords, we need to consider the possible combinations of 4 bits of data and ensure that the resulting 5-bit codeword meets the requirements of having at most 1 leading and at most 1 trailing zero.

Possible combinations of 4 bits:
There are 2^4 = 16 possible combinations of 4 bits. These combinations range from 0000 to 1111.

Encoding scheme:
In the 4B/5B encoding scheme, each 4-bit combination is encoded into a unique 5-bit codeword. Let's analyze the possible codewords for each 4-bit combination:

1. 0000: This combination has 2 trailing zeros, which is not allowed. Therefore, it is not a valid codeword.

2. 0001: This combination has 3 trailing zeros, which is not allowed. Therefore, it is not a valid codeword.

3. 0010: This combination has 2 trailing zeros, which is not allowed. Therefore, it is not a valid codeword.

4. 0011: This combination has 1 trailing zero, which is allowed. Therefore, it is a valid codeword.

5. 0100: This combination has 2 trailing zeros, which is not allowed. Therefore, it is not a valid codeword.

6. 0101: This combination has 1 trailing zero, which is allowed. Therefore, it is a valid codeword.

7. 0110: This combination has 1 trailing zero, which is allowed. Therefore, it is a valid codeword.

8. 0111: This combination has 0 trailing zeros, which is allowed. Therefore, it is a valid codeword.

9. 1000: This combination has 1 leading zero, which is allowed. Therefore, it is a valid codeword.

10. 1001: This combination has 1 leading zero and 1 trailing zero, which is allowed. Therefore, it is a valid codeword.

11. 1010: This combination has 1 leading zero and 1 trailing zero, which is allowed. Therefore, it is a valid codeword.

12. 1011: This combination has 1 leading zero and 1 trailing zero, which is allowed. Therefore, it is a valid codeword.

13. 1100: This combination has 1 leading zero and 2 trailing zeros, which is not allowed. Therefore, it is not a valid codeword.

14. 1101: This combination has 1 leading zero and 1 trailing zero, which is allowed. Therefore, it is a valid codeword.

15. 1110: This combination has 1 leading zero and 1 trailing zero, which is allowed. Therefore, it is a valid codeword.

16. 1111: This combination has 1 leading zero and 2 trailing zeros, which is not allowed. Therefore, it is not a valid codeword.

Total number of valid codewords:
From the analysis above, we can see that there are 9 valid codewords out of the 16 possible combinations of 4 bits. Therefore, the total number of valid codewords is 9.

Therefore
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Question Description
In the 4B/5B encoding scheme, every 4 bits of data are encoded in a 5-bit codeword. It is required that the codewords haveat most 1 leading and at most 1 trailing zero. How many such codewords are possible?a)14b)16c)18d)20Correct answer is option 'C'. Can you explain this answer? for Computer Science Engineering (CSE) 2025 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about In the 4B/5B encoding scheme, every 4 bits of data are encoded in a 5-bit codeword. It is required that the codewords haveat most 1 leading and at most 1 trailing zero. How many such codewords are possible?a)14b)16c)18d)20Correct answer is option 'C'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2025 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for In the 4B/5B encoding scheme, every 4 bits of data are encoded in a 5-bit codeword. It is required that the codewords haveat most 1 leading and at most 1 trailing zero. How many such codewords are possible?a)14b)16c)18d)20Correct answer is option 'C'. Can you explain this answer?.
Solutions for In the 4B/5B encoding scheme, every 4 bits of data are encoded in a 5-bit codeword. It is required that the codewords haveat most 1 leading and at most 1 trailing zero. How many such codewords are possible?a)14b)16c)18d)20Correct answer is option 'C'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of In the 4B/5B encoding scheme, every 4 bits of data are encoded in a 5-bit codeword. It is required that the codewords haveat most 1 leading and at most 1 trailing zero. How many such codewords are possible?a)14b)16c)18d)20Correct answer is option 'C'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of In the 4B/5B encoding scheme, every 4 bits of data are encoded in a 5-bit codeword. It is required that the codewords haveat most 1 leading and at most 1 trailing zero. How many such codewords are possible?a)14b)16c)18d)20Correct answer is option 'C'. Can you explain this answer?, a detailed solution for In the 4B/5B encoding scheme, every 4 bits of data are encoded in a 5-bit codeword. It is required that the codewords haveat most 1 leading and at most 1 trailing zero. How many such codewords are possible?a)14b)16c)18d)20Correct answer is option 'C'. Can you explain this answer? has been provided alongside types of In the 4B/5B encoding scheme, every 4 bits of data are encoded in a 5-bit codeword. It is required that the codewords haveat most 1 leading and at most 1 trailing zero. How many such codewords are possible?a)14b)16c)18d)20Correct answer is option 'C'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice In the 4B/5B encoding scheme, every 4 bits of data are encoded in a 5-bit codeword. It is required that the codewords haveat most 1 leading and at most 1 trailing zero. How many such codewords are possible?a)14b)16c)18d)20Correct answer is option 'C'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev