ITPEC FE Morning October 2022 Question 5
Source exam: ITPEC FE Morning October 2022Topic: Basic Theory & Math
ITPEC FE Morning October 2022 — Question 5 of 80
Hamming Distance — count positions where two bit strings differ.
Compare 10101 and 11110 bit by bit:
- •Position 1:
1vs1→ same - •Position 2:
0vs1→ different - •Position 3:
1vs1→ same - •Position 4:
0vs1→ different - •Position 5:
1vs0→ different
Hamming distance = 3
Why not others:
- (a) 0 — would mean identical strings
- (b) 2 — undercounts by one position
- (d) 5 — would require all bits to differ
Key rule: XOR the strings and count the 1s: 10101 XOR 11110 = 01011 → three 1s → distance is 3.
AI-generated — may contain errors
The original exam layout is preserved in the image so diagrams, formulas, tables, and code remain accurate.
This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.