---
title: "Design a (6,3) block code word"
subject: "Data Communication"
chapter: 8
key: "semester_5/data_communication:block-code-63-design"
source: https://www.bctengineer.com/q/semester_5/data_communication/block-code-63-design
site: BCT Engineering
---

# Design a (6,3) block code word

Data Communication · Chapter 8: Information Theory and Coding

- Asked in: 2074 Asoj, 5 marks; 2073 Chaitra, 6 marks; 2070 Chaitra, 2+6 marks (asked 3 times)
- Video: [Generator Matrix to generate code words in Linear Block Code with example in Digital Communication](https://www.youtube.com/watch?v=Y2wpSJUHEfw) — Engineering Funda
- Answer checked by Claude Sonnet 5.5 on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_5/data_communication/block-code-63-design
- Whole chapter: https://www.bctengineer.com/md/semester_5/data_communication/chapter-8

## Question

Design a codeword of a c(6,3) block code with any suitable generation matrix.

## Short answer

A systematic (6,3) code with generator matrix G = [I3 | P] where P = [1 1 0; 0 1 1; 1 0 1] yields parity bits p1=m1⊕m3, p2=m1⊕m2, p3=m2⊕m3. For message m=101, the codeword is 101101. This code has dmin=3, detects 2 errors, corrects 1.

## Answer

#### Block code (n, k)
In an (n, k) block code each block of k message bits is mapped to an n-bit codeword by adding q = n − k parity bits. Here n = 6, k = 3, q = 3, rate = 1/2.

#### Generator matrix
Take a systematic G = [Ik | P], where P is a 3 × 3 parity matrix:

```text
      | 1 0 0 : 1 1 0 |
 G =  | 0 1 0 : 0 1 1 |
      | 0 0 1 : 1 0 1 |
```

Codeword **c = m·G** (mod 2), giving c = [m1 m2 m3 | p1 p2 p3] where
- p1 = m1 ⊕ m3
- p2 = m1 ⊕ m2
- p3 = m2 ⊕ m3

#### All codewords
| Message | Codeword | Weight |
|---|---|---|
| 000 | 000000 | 0 |
| 001 | 001101 | 3 |
| 010 | 010011 | 3 |
| 011 | 011110 | 4 |
| 100 | 100110 | 3 |
| 101 | 101011 | 4 |
| 110 | 110101 | 4 |
| 111 | 111000 | 3 |

Minimum weight = **3**, so d_min = 3; the code detects 2 errors and corrects 1 error.

#### Parity-check matrix
H = [Pᵀ | I₃]:

```text
      | 1 0 1 : 1 0 0 |
 H =  | 1 1 0 : 0 1 0 |
      | 0 1 1 : 0 0 1 |
```
Check: c·Hᵀ = 0 for every codeword. For c = 101011: row 1 gives c1⊕c3⊕c4 = 1⊕1⊕0 = 0; row 2 gives c1⊕c2⊕c5 = 1⊕0⊕1 = 0; row 3 gives c2⊕c3⊕c6 = 0⊕1⊕1 = 0. All zero, so c is valid.

## Check yourself

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

1. For c(6,3), how many parity bits and what rate?
   A. 3 parity bits, rate 1/2
   B. 6 parity bits, rate 1
   C. 2 parity bits, rate 3/5
   D. 3 parity bits, rate 2
   Answer: A. q = n-k = 3, rate k/n = 1/2. (Key point: Parameters)

2. What is the systematic generator matrix form?
   A. G = [Ik | P]
   B. G = [P | P]
   C. G = [I | I]
   D. G = [0 | P]
   Answer: A. Identity followed by parity matrix P. (Key point: Generator form)

3. With the answer's G, the codeword for message 101 is
   A. 101011
   B. 101101
   C. 100110
   D. 111000
   Answer: A. Add row 1 and row 3: 100110 xor 001101 = 101011. (Key point: Codeword)

4. With d_min = 3, the code can
   A. Detect 2 and correct 1 error
   B. Detect 1 and correct 2
   C. Detect 3 and correct 2
   D. Correct 3
   Answer: A. d_min = 3 detects 2 and corrects 1. (Key point: d_min)

## Related in Data Communication

- [Design a C(8,4) linear block code](https://www.bctengineer.com/question.md?key=semester_5%2Fdata_communication%3Alinear-block-code-84) — 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
- [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

## Related in other subjects

- [(6, 3) code from parity check matrix](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Alinear-block-code-6-3-h-matrix) — Communication Systems, chapter 8
- [Benefits of CBSE; CASE code generation](https://www.bctengineer.com/question.md?key=semester_5%2Fsoftware_engineering%3Acbse-benefits-case) — Software Engineering, chapter 6
- [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×
- [Convolutional vs block coder; (7,4) cyclic code for 1010](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Aconv-vs-block-cyclic-7-4-1010) — Communication Systems, chapter 8, asked 2×
