---
title: "Capability of a code with dmin = 4"
subject: "Data Communication"
chapter: 8
key: "semester_5/data_communication:hamming-distance-dmin4"
source: https://www.bctengineer.com/q/semester_5/data_communication/hamming-distance-dmin4
site: BCT Engineering
---

# Capability of a code with dmin = 4

Data Communication · Chapter 8: Information Theory and Coding

- Asked in: 2068 Chaitra, 2+3 marks
- Video: [Minimum Hamming Distance, Error Detection Capability, and Error Correction Capability Explained](https://www.youtube.com/watch?v=hrc8kXoBdlw) — Engineering Funda
- Answer checked by Claude Sonnet 5.5 on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_5/data_communication/hamming-distance-dmin4
- Whole chapter: https://www.bctengineer.com/md/semester_5/data_communication/chapter-8

## Question

Define Hamming Distance and minimum Hamming distance. Suppose a code has a Hamming distance dmin = 4. What is the error detection and correction capability of this scheme?

## Short answer

Hamming distance is the number of differing bit positions between two codewords; d_min is the minimum such distance among all codeword pairs. For d_min = 4, it detects up to 3 errors, corrects 1 error, and can simultaneously correct 1 error and detect up to 2 errors (SEC-DED).

## Answer

#### Hamming distance
The Hamming distance d(x, y) between two equal-length binary words is the number of positions in which they differ (the weight of x ⊕ y). Example: d(1011, 1101) = 2.

#### Minimum Hamming distance
d_min is the smallest Hamming distance between any two distinct codewords of a code. Example: for {000, 011, 101, 110}, d_min = 2.

#### Capability for d_min = 4
- Error detection: up to d_min − 1 = **3** errors can be detected.
- Error correction: up to t = ⌊(d_min − 1)/2⌋ = ⌊3/2⌋ = **1** error can be corrected.
- Simultaneous: with d_min ≥ t + s + 1 (t corrected, s detected, s ≥ t), it can correct 1 error and also detect up to 2 errors (4 ≥ 1 + 2 + 1). This is the single-error-correcting, double-error-detecting (SEC-DED) mode, as in an extended Hamming code.

Rules used: detect s errors needs d_min ≥ s + 1; correct t errors needs d_min ≥ 2t + 1.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What is d(1011, 1101)?
   A. 1
   B. 2
   C. 3
   D. 4
   Answer: B. The words differ in positions 2 and 3, i.e. the weight of 1011 ⊕ 1101 = 0110 is 2. (Key point: Hamming distance)

2. How many errors can a code with d_min = 4 detect and correct?
   A. Detect 3, correct 1
   B. Detect 4, correct 2
   C. Detect 2, correct 2
   D. Detect 1, correct 1
   Answer: A. Detection is d_min - 1 = 3; correction is floor(3/2) = 1. (Key point: Detection for d_min = 4)

3. What mode does d_min = 4 support when correcting 1 error?
   A. Also detecting up to 2 errors (SEC-DED)
   B. Also detecting 3 more errors
   C. Correcting 2 errors
   D. No additional detection
   Answer: A. d_min >= t + s + 1 gives 4 >= 1 + 2 + 1, so it corrects 1 and detects 2, as in the extended Hamming code. (Key point: Simultaneous correction and detection)

## Related in Data Communication

- [Forward error correction using Hamming code](https://www.bctengineer.com/question.md?key=semester_5%2Fdata_communication%3Afec-hamming) — Data Communication, chapter 8
- [Minimum Hamming distance; find k and n](https://www.bctengineer.com/question.md?key=semester_5%2Fdata_communication%3Amin-hamming-k-n) — Data Communication, chapter 8
- [Hamming distance and minimum distance](https://www.bctengineer.com/question.md?key=semester_5%2Fdata_communication%3Ahamming-distance-define) — Data Communication, chapter 8, asked 2×
- [Redundancy, Hamming distance, linear vs cyclic](https://www.bctengineer.com/question.md?key=semester_5%2Fdata_communication%3Aredundancy-hamming-linear-cyclic) — Data Communication, chapter 8
- [(6,3) block code words, weights, dmin](https://www.bctengineer.com/question.md?key=semester_5%2Fdata_communication%3Ablock-code-63-matrix-weights) — Data Communication, chapter 8
- [Construct a (7,4) Hamming code](https://www.bctengineer.com/question.md?key=semester_5%2Fdata_communication%3Ahamming-74-construct) — Data Communication, chapter 8

## Related in other subjects

- [Short note: Error detection and correction capability](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Ashort-note-error-detect-correct-capability) — Communication Systems, chapter 8
- [Error detection vs correction; rate ½ convolutional encoder](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Aerror-detect-correct-conv-half-rate) — Communication Systems, chapter 8
- [Significance of dmin; (7,4) cyclic code for 1101 with g(x) = 1 + x + x²](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Admin-cyclic-7-4-1101) — Communication Systems, chapter 8
- [Hamming weight and distance; (7,4) cyclic code for 1011](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Ahamming-weight-cyclic-1011) — Communication Systems, chapter 8, asked 2×
