---
title: "(6,3) block code words, weights, dmin"
subject: "Data Communication"
chapter: 8
key: "semester_5/data_communication:block-code-63-matrix-weights"
source: https://www.bctengineer.com/q/semester_5/data_communication/block-code-63-matrix-weights
site: BCT Engineering
---

# (6,3) block code words, weights, dmin

Data Communication · Chapter 8: Information Theory and Coding

- Asked in: 2079 Baisakh, 2+4+2+2 marks
- Video: [Linear block Code | solution of previous year paper | ITC | Parity check matrix H | Code vectors](https://www.youtube.com/watch?v=fp9CyjgOG4I) — Techno Tutorials ( e-Learning)
- Answer checked by Claude Sonnet 5.5 on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_5/data_communication/block-code-63-matrix-weights
- Whole chapter: https://www.bctengineer.com/md/semester_5/data_communication/chapter-8

## Question

Define block codes. The systematic generator matrix for a (6,3) block code is given below. Obtain all code words, Hamming weights and minimum Hamming distance from this matrix.
G = [1 0 0 : 0 1 1; 0 1 0 : 1 0 1; 0 0 1 : 1 1 0]

## Short answer

Block codes map k-bit message blocks to n-bit codewords via c=mG. For this (6,3) systematic code, all eight codewords have weights 0, 3, 3, 4, 3, 4, 4, 3. Minimum Hamming distance d_min = 3 (smallest non-zero weight), so it detects 2 errors and corrects 1.

## Answer

#### Block codes
A **block code** (n, k) divides the data into blocks of k bits and encodes each block into an n-bit codeword by adding n − k check bits. The code rate is k/n. Codeword c = m·G, where G is the k × n generator matrix.

#### Codewords
Here G = [I₃ | P] with rows 100011, 010101, 001110. For message m = (m1 m2 m3), c = [m1 m2 m3 | p1 p2 p3] with
- p1 = m2 ⊕ m3
- p2 = m1 ⊕ m3
- p3 = m1 ⊕ m2

| Message | Codeword | Hamming weight |
|---|---|---|
| 000 | 000000 | 0 |
| 001 | 001110 | 3 |
| 010 | 010101 | 3 |
| 011 | 011011 | 4 |
| 100 | 100011 | 3 |
| 101 | 101101 | 4 |
| 110 | 110110 | 4 |
| 111 | 111000 | 3 |

Example: 011 = row 2 ⊕ row 3 = 010101 ⊕ 001110 = 011011.

#### Hamming weights
Weights are 0, 3, 3, 4, 3, 4, 4, 3 (the weight of a codeword is the number of 1s).

#### Minimum Hamming distance
For a linear code, d_min = minimum weight of the non-zero codewords = **3**.

(The distance between any two codewords is the weight of their sum, which is again a codeword, so it is at least 3.)

**Answer: d_min = 3; the code detects 2 errors and corrects 1 error.**

## Check yourself

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

1. What does an (n, k) block code do?
   A. Compresses n bits into k bits
   B. Encodes each k-bit block into an n-bit codeword by adding n - k check bits
   C. Encodes bits one at a time using memory
   D. Removes redundancy from the source
   Answer: B. Data is split into k-bit blocks and each is extended with n - k check bits, giving rate k/n. (Key point: Block code definition)

2. For G = [I | P] with rows 100011, 010101, 001110, which is the first parity bit p1?
   A. m1 xor m2
   B. m1 xor m3
   C. m2 xor m3
   D. m1 xor m2 xor m3
   Answer: C. The first column of P is 0,1,1, so p1 = m2 xor m3. (Key point: Parity equations)

3. What is the codeword for message 011?
   A. 011011
   B. 011110
   C. 010101
   D. 001110
   Answer: A. Row 2 xor row 3 = 010101 xor 001110 = 011011. (Key point: Codeword for 011)

4. The non-zero weights are 3, 3, 4, 3, 4, 4, 3. What is d_min and why?
   A. 4, the largest weight
   B. 3, the minimum non-zero codeword weight
   C. 7, the number of codewords
   D. 0, because of the zero codeword
   Answer: B. In a linear code the distance between two codewords is the weight of their sum (a codeword), so d_min equals the minimum non-zero weight, 3. (Key point: Minimum distance of linear code)

## Related in Data Communication

- [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
- [All code words of the (6,3) code with given G](https://www.bctengineer.com/question.md?key=semester_5%2Fdata_communication%3Ablock-code-63-all-codewords) — Data Communication, chapter 8
- [Capability of a code with dmin = 4](https://www.bctengineer.com/question.md?key=semester_5%2Fdata_communication%3Ahamming-distance-dmin4) — 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×
- [Hamming codes and their properties](https://www.bctengineer.com/question.md?key=semester_5%2Fdata_communication%3Ahamming-code-properties) — Data Communication, chapter 8
- [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

## Related in other subjects

- [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
- [Convolutional vs block codes; (7,4) cyclic code for 1011](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Aconv-vs-block-cyclic-7-4-1011) — Communication Systems, chapter 8, asked 2×
- [Short note: Syndrome calculation in linear systematic block code](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Ashort-note-syndrome-calculation) — Communication Systems, chapter 8
- [Hamming distance and weight; (6,3) code check for 100101](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Ahamming-6-3-h-100101) — Communication Systems, chapter 8
