Skip to main content

Convolutional coder with example

Short answer

A convolutional encoder passes bits through a shift register and forms outputs via modulo-2 sums of selected taps, providing memory. Example: rate-1/2, K=3 with generators (1,1,1) and (1,0,1). Encoding message 10011 (plus flush) yields output 11 10 11 11 01 01 11.

Explain Convolutional Coder with suitable example.

A convolutional coder is a forward error-correcting encoder with memory. It passes the message bits through a shift register and forms output bits as modulo-2 sums of selected stages, so each output depends on the present bit and the previous K−1K-1 bits. With kk inputs and nn outputs per step, the code rate is r=k/nr=k/n; KK is the constraint length.

Example: rate 1/2, K = 3

Generators g(1)=(1,1,1)g^{(1)}=(1,1,1), g(2)=(1,0,1)g^{(2)}=(1,0,1):

ci(1)=mi⊕mi−1⊕mi−2,ci(2)=mi⊕mi−2c_i^{(1)}=m_i\oplus m_{i-1}\oplus m_{i-2},\qquad c_i^{(2)}=m_i\oplus m_{i-2}
 Encoder: g1 = 111, g2 = 101 (K = 3, rate 1/2)

 m -->[ m_i ]-->[ m_i-1 ]-->[ m_i-2 ]
        |          |           |
        +---(+)----+-----------+---> c1 = mi+mi-1+mi-2
        |                      |
        +---(+)----------------+---> c2 = mi+mi-2
            output per bit: c1 c2

Encoding message 1001110011 (plus 00 to flush):

mim_i(mi−1mi−2)(m_{i-1}m_{i-2}) beforec(1)c(2)c^{(1)}c^{(2)}
10011
01010
00111
10011
11001
01101
00111

Output: 11 10 11 11 01 01 11.

Representations

  • Code tree: each input bit splits a branch (up = 0, down = 1), labelled with output bits.
  • State diagram: 4 states (a = 00, b = 10, c = 01, d = 11), e.g. a goes to b with output 11 on input 1.
  • Trellis: the state diagram drawn over time; used by the decoder.

Decoding

The Viterbi algorithm compares the received sequence with every trellis path, keeps the best (minimum distance) path into each state, and outputs the survivor; it is a maximum-likelihood decoder. The free distance of this code is dfree=5d_{free}=5, so it can correct 2 errors within a short span.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Communication Systems chapter 8 questions →