@ 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$

+26 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.6k
- Engineering Mathematics 7.5k
- Digital Logic 3k
- Programming & DS 4.9k
- Algorithms 4.3k
- Theory of Computation 6k
- Compiler Design 2.1k
- Databases 4.2k
- CO & Architecture 3.5k
- Computer Networks 4.2k
- Non GATE 1.4k
- Others 1.5k
- Admissions 586
- Exam Queries 572
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 18

50,129 questions

53,252 answers

184,785 comments

70,506 users