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

+22 votes

Best answer

0

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

–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.3k
- Engineering Mathematics 5.2k
- Digital Logic 2k
- Programming & DS 3.7k
- Algorithms 3.2k
- Theory of Computation 4k
- Compiler Design 1.6k
- Databases 3k
- CO & Architecture 2.6k
- Computer Networks 3k
- Non GATE 1k
- Others 1.3k
- Admissions 486
- Exam Queries 435
- Tier 1 Placement Questions 18
- Job Queries 56
- Projects 9

36,157 questions

43,608 answers

123,961 comments

42,860 users