@ Arjun sir,

codes 2 & 4 also has distance 2. right?

010101

XOR

011001

= 001100

codes 2 & 4 also has distance 2. right?

010101

XOR

011001

= 001100

The Gateway to Computer Science Excellence

First time here? Checkout the FAQ!

x

+14 votes

What is the distance of the following code $000000$, $010101$, $000111$, $011001$, $111111$?

- $2$
- $3$
- $4$
- $1$

+25 votes

Best answer

0

@Arjun Sir, do we need to check each codeword distance to every other codeword, or just go sequentially?

+1 vote

and 011001

and Answer is 2

–1 vote

+1

we have to choose the minimum distance by performing an Ex-OR operation between all pair of valid codes. now we have to select which pair has given the minimum number of 1's after Ex-OR operation. count that minimum number of 1's and that will be the distance. in this case, 010101 ⊕ 011001 = 001100 number of 1's is 2 so HD is 2,

- All categories
- General Aptitude 1.5k
- Engineering Mathematics 7.1k
- Digital Logic 2.7k
- Programming & DS 4.9k
- Algorithms 4.2k
- Theory of Computation 5.3k
- Compiler Design 2.1k
- Databases 4k
- CO & Architecture 3.5k
- Computer Networks 4k
- Non GATE 1.4k
- Others 1.5k
- Admissions 559
- Exam Queries 553
- Tier 1 Placement Questions 23
- Job Queries 69
- Projects 18

47,913 questions

52,293 answers

182,250 comments

67,736 users